1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Button click problem C#

Discussion in 'C, C++, C#' started by MisterNick, Oct 12, 2016.

  1. MisterNick

    MisterNick Registered Member

    Joined:
    Oct 22, 2014
    Messages:
    71
    Likes Received:
    51
    Occupation:
    Programmer
    Location:
    Tbilisi,Georgia
    Hello,

    I'm trying to create a following bot on specific website. When i try to click on "Follow" button by innertext or class name nothing happens, but when i open usual chrome browser and perform that operation it works fine. Any suggestion what it is? or how to fix that?

    Thanks
     
  2. astrodream

    astrodream Newbie

    Joined:
    Sep 5, 2016
    Messages:
    7
    Likes Received:
    0
    post more details. how you trying to do this?
     
  3. Tomothy Jackson

    Tomothy Jackson Registered Member

    Joined:
    Jun 6, 2017
    Messages:
    63
    Likes Received:
    8
    Gender:
    Male
    Please post more details. Did you use WebBrowser to open the website? Try this:
    Code:
    var links = webBrowser1.Document.GetElementsByTagName("a");
    foreach (HtmlElement link in links)
    {
       if (link.GetAttribute("className") == "show1")
       {
           //do something
       }
    }
     
  4. chimpcoder

    chimpcoder Newbie

    Joined:
    Sep 13, 2016
    Messages:
    24
    Likes Received:
    3
    Gender:
    Male
    You should specify either you are using webbased apps or desktop apps.