Hi ive been trying to click a close button within a iframe within a webbrowser control..
my code works in WebBrowser.Document not Reading Outterhtml="x"
Try
WebBrowser1.Document.GetElementById("bannerClose").InvokeMember("Click")
Catch ex As Exception
End Try
and
Dim theElementCollection3 As Windows.Forms.HtmlElementCollection
theElementCollection3 = WebBrowser1.Document.GetElementsByTagName("img")
For Each curElement As HtmlElement In theElementCollection3
If curElement.GetAttribute("alt").Contains("x") Then
curElement.InvokeMember("click")
End If
Next
But does not work in InvokeMember("click") in a iframe..
iframe Code:
<a href="javascript:void(0)" onClick="removeOverlayHTML()">
<img style="position:absolute;top:97px;left:290px;border:0;z-index:101;width:10px;height:10px" src="http://www.castup.tv/images/close_button.png" alt="x"/></a>
PLease!!!! Help!! Thank You...