1

I am trying to click a div id button in vb.net, I have the webbrowser included, here is my current code. I'm just trying to click the 'Do Job' on the website, but in vb.net.

WebBrowser1.Document.GetElementById("hunt_job_button100").InvokeMember("click")

This doesn't work, the div id for the website is:

I also need to display a little text from the facebook app itself to a textbox in vb.net, and the div id for the text i want to copy to the vb.net textbox is "energy_value".

Everything on this app is div id

T.S.
  • 18,195
  • 11
  • 58
  • 78
Travis
  • 37
  • 6

1 Answers1

0

Use this :

webBrowser1.Document.GetElementById("hunt_job_button100").InvokeMember("click")

Or as you are using Class also i suggest to use it :

  HtmlElementCollection classButton = webBrowser1.Document.All;
    foreach (HtmlElement element in classButton) 
    {
        if (element.GetAttribute("className") == "hunt_job_button")
        {
            element.InvokeMember("click");
        }

}

regards

Bouam
  • 484
  • 2
  • 10