Okay lets say the page contains a link called 'About Us'. Instead of me doing:
webBrowser.Navigate ("www.page.com/aboutus");
...how can I tell my program to click any link that contains the text About Us?
I know this might seem like Im doing more work then necessary I have too but trust me I need this bit of code.
Any help would be appreciated, thanks :)
You need to find the
HtmlElement
object for the<a>
tag, then callInvokeMember("click")
.If the element has an ID, you can get it by calling
Document.GetElementById
; otherwise, you can look throughGetElementsByTagName
and find the element you're looking for.