2

So there is a button call next (page). Its href link is site/blah/#. So i know its really running javascript code. After i finish parsing the first page i would like to parse the next page. How do i simulate a mouse click there so i can continue loading and parsing pages?

i am using C# .NET

2 Answers 2

5

childElement.RaiseEvent("OnClick");

Sign up to request clarification or add additional context in comments.

Comments

4

If you know the id of the tag you can use below given code

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

if you dont know the id you can follow this code

foreach (System.Windows.Forms.HtmlElement html in WebBrowser1.Document.GetElementsByTagName("a")) { if (html.InnerText == "YOUR TEXT") { html.InvokeMember("click"); } } 

Contact if you have any doubt

1 Comment

What is the difference between this answer and user34537's ?