Web Browser Component ~ how to click this link in the browser -onclick

simpleonline12

New member
Sep 29, 2009
191
3
0
I have link that uses a pop up window that I need to click. I can click the link to get the pop up window to be visible but in this pop-up window there is a link that I cannot figure out how to click automatically.

This is what I get when I inspect the element in Firefox using the Firebug plug-in

Code:
<span id="modal-show-picture-trigger"> or your <a onclick="$('#modal-show-picture').removeClass('hidden').hide().slideDown(); $('#modal-show-picture-trigger').hide();">view picture</a> </span>
Any ideas on how to click this link?

I've tried using this code that normally works when I use it in the document completed section of the web browser.
Any ideas on how to click this link?

Code:
Imports System.Net 
Imports System.IO 
Imports System.Text 
Imports System.Xml 
Imports mshtml   

Public Class Form1        

Dim statustext As Integer = 0    

Private Sub WebBrowser1_DocumentCompleted(ByVal
 sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted 

If Not WebBrowser1.IsBusy = True Then             
If statustext = 1 Then                 
For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("a")                     
If element.InnerText = "view picture" Then                         
element.InvokeMember("click")                         
statustext = 0                     
End If                 
Next             
End If
End If  

End Sub 

End Sub  

End Class