2
Hello, everybody!
Here’s the thing, I need to make my program click on an element. Here’s a photo to make it easier to understand: http://i.imgur.com/Uitnkvt.png
I’ve tried a lot of things, but nothing successful so far... I want the button pressed
My code is like this so far:
Dim PageElement1 As HtmlElementCollection = WebBrowser1.Document.All.GetElementsByName("")
For Each CurElement1 As HtmlElement In PageElement1
If (CurElement1.GetAttribute("classname") = "preferred-login facebook-login") Then
CurElement1.InvokeMember("click")
MsgBox("Deu Certo")
End If
Next
But the "click" doesn’t work... Well, if anyone can help... Thank you in advance!
So guys, I tried in many ways, but the problem is not finding the element, the problem is even clicking it. It is not clicking... Someone can try to make an application that clicks the facebook login button of the site en.stackoverflow and send me an example for me to study?
– Wesley Silva
@Wesleysilva dude, you can also make Selenium run a Javascript command that click the button for you.
– Ulysses Alves