How to click on a link ?
-
Hi All I am using a WebBrowser control to navigate to sites in my VB.Net application. After navigating I want to Navigate to some of the links in it depending on some conditions. Can anybody advise how can I collect the links contained in the WebBrowser Document and how can I Raise a click event for a collected link so that it automatically navigates to the link. I have written the code as bellow : Dim link1 As mshtml.HTMLLinkElement link1 = WebBrowser1.Document.Links(10) Now How can I click the link link1 to navigate to the link. Please Help. Thanks in advance.
Sekhar :)
-
Hi All I am using a WebBrowser control to navigate to sites in my VB.Net application. After navigating I want to Navigate to some of the links in it depending on some conditions. Can anybody advise how can I collect the links contained in the WebBrowser Document and how can I Raise a click event for a collected link so that it automatically navigates to the link. I have written the code as bellow : Dim link1 As mshtml.HTMLLinkElement link1 = WebBrowser1.Document.Links(10) Now How can I click the link link1 to navigate to the link. Please Help. Thanks in advance.
Sekhar :)
Did you try using
WebBrowser1.Navigate
?"Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup
-
Did you try using
WebBrowser1.Navigate
?"Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup
Hi Nilesh I had already used that before I get this problem. I am able to navigate to url addresses using WebBrowser1.Url = New System.Uri(txtURL.Text) and after navigating to the site in the txtURL i found there are several links and several buttons. I want to know how I can click on a link or a button on the page so that I can actually simulate the process of someone sitting and clicking on the links. Thanks for your response. If anybody can help me out in finding a solution to this problem then it will help me a lot. Thanks in advance.
Sekhar :)