I want to click the link after going to the website
webKitBrowser1.Navigate("http://www.somesite.com");
How to click a link on this website, assuming the link identifier lnkId?
<a href="http://www.google.com" id="lnkId"> Go to Google </a>
In the default browser that comes with Visual Studio, I can do this using the following code:
foreach (HtmlElement el in webBrowser1.Document.GetElementTagName("a")) {
if (el.GetAttribute("id") == "lnkId") {
el.InvokeMember("click");
}
}
What is the code equivalent above when I use the WebkitDotNet control?
source
share