No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Well I need to be able to click this picture out of my webbrowser in VB. [CODE]<img src="/images/skip_ad/en.png" alt="Skip Ad" height="39" id="skip_ad_button"[/CODE] I have tried this code: [CODE]Dim col As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img") For Each elem As HtmlElement In col If elem.GetAttribute("src").Contains("/images/skip_ad/en.png") Then elem.InvokeMember("click") ListBox1.Items.Add("clicked") End If[/CODE] And this code: … |
|
[CODE]<img src="/images/skip/en.png" alt="Skip" height="39" id="skip">[/CODE] I tried this code: [CODE] Dim theElementCollection As HtmlElementCollection = Bot.Document.GetElementsByTagName("img") For Each curElement As HtmlElement In theElementCollection Dim controlName As String = curElement.GetAttribute("name").ToString controlName = "skip" curElement.InvokeMember("click")[/CODE] So pretty much I need to click the image to pass to the next page. |