Button click problem C#

MisterNick

Registered Member
Joined
Oct 22, 2014
Messages
80
Reaction score
61
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
 
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
   }
}
 
It might be behind some JS. Which browser emulator are you using? Try dumping the source to disk where the problem occurs. You may find there are no elements visible, at least not the ones you want.
 
I have this problem with Selenium and search google button.
Some buttons on the web are not button html tag but div or input tags with javascript function.
So you need to simulate a click with your bot at the position of the button.
 
Hi sir, it means that the element you clicked is wrong, or you cannot find the correct element, so you cannot click
 
Oh sorry, I'm a novice. I didn't pay attention to the time. I was just a C # developer, so I came to answer these questions!
No worries, it could help other people if they get similar issues, just try not to wake old topics and focus on new ones! Cheers
 
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
Maybe you have overlapping in this button?)
 
Back
Top