Hey i am trying to make a browser game bot, but i can't seem to get the program to click a "link" with getelementbyid :/ is should happen when i click a button.
here is the code:
private void button1_Click(object sender, EventArgs e)
{
var flyplass = webBrowser1.Document.GetElementById("flyplass");
webBrowser1.Document.GetElementById("flyplass");
flyplass.InvokeMember("Click");
}
Loading
VulpesPosted May 22, 2014, 3:40 PM
Try using "onclick" rather than "Click" as that's the actual name of the DOM event.
BTW, you can delete the second line as it's redundant.