Question[help]clicking on a webbrowser[Solved]

Posts 111 of 11 · Page 1 of 1
[help]clicking on a webbrowser[Solved]
ok i have a webbrowser and a timer and a textbox, that button goes to the website in the texbox and then it starts the timer and then i want the timer to click something on the page it lands on but the source of the page is just a bunch of stuff there is no names no id or nothing. please help.

i have tried
Code:
WebBrowser1.Document.GetElementById("w/e").InvokeMember("submit")
Code:
 WebBrowser1.Document.Forms(0).InvokeMember("submit")
yes i have tried using other #'s than 0
What website is it? Pm me the link

It could be that it's "click" and not submit , but looking at it will help

It could be a plethora of different things
Try

[php]
WebBrowser1.Document.Links(1).InvokeMember("Click" )
[/php]
Quote Originally Posted by NextGen1 View Post
Try

[php]
WebBrowser1.Document.Links(1).InvokeMember("Click" )
[/php]
Nope it did not work I'm really confused.
if its something like myspace? try using this
[php]webbrowser.Document.Forms("aspnetForm").InvokeMemb er("submit")[/php]
or replace the name open it in dream weaver or somhtign to get the name
A. it's a Href

B. Just use Sendkeys and Sendkeys Tab then Enter

That will deff work.
Quote Originally Posted by NextGen1 View Post
A. it's a Href

B. Just use Sendkeys and Sendkeys Tab then Enter

That will deff work.
so simple yet its the last thing i would have thought of.... I LOVE U! FINALLY IT WORKS!
Not a prob
Quote Originally Posted by NextGen1 View Post
Not a prob
um how do i send tab with send keys? it doesn't seem to be working at all for me.

i've tried
Code:
System.Windows.Forms.SendKeys.Send("{TAB}")
                System.Windows.Forms.SendKeys.Send("{ENTER}")
&
Code:
SendKeys.Send("{TAB}")
SendKeys.Send("{ENTER}")
IDK only the tab won't work have any ideas.
get webbrowser focus first

[php]
WebBrowser1.Focus()
System.Windows.Forms.SendKeys.Send("{TAB}")
System.Windows.Forms.SendKeys.Send("{ENTER}")
[/php]

Quote Originally Posted by NextGen1 View Post
get webbrowser focus first

[php]
WebBrowser1.Focus()
System.Windows.Forms.SendKeys.Send("{TAB}")
System.Windows.Forms.SendKeys.Send("{ENTER}")
[/php]

idk if i am using it wrong or not but here is the code i have.

Code:
   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebBrowser1.Navigate(TextBox1.Text)
        Timer1.Start()
    End Sub
Code:
   Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If WebBrowser1.ReadyState = WebBrowserReadyState.Complete = True Then
            Dim Url As String = WebBrowser1.Url.AbsoluteUri

            Dim FUrl As Boolean = False

            If Url.Contains(TextBox1.Text) Then
                FUrl = True
            Else
                FUrl = False
            End If

            If FUrl = True Then
                WebBrowser1.Focus()
                System.Windows.Forms.SendKeys.Send("{TAB}")
                System.Windows.Forms.SendKeys.Send("{ENTER}")


                Timer1.Stop()

            ElseIf FUrl = False Then

            End If
        End If
i have tried making another button and just putting.
Code:
   WebBrowser1.Focus()
                System.Windows.Forms.SendKeys.Send("{TAB}")
                System.Windows.Forms.SendKeys.Send("{ENTER}")
on it and having button 1 just navigate but it still doesn't work.
Posts 111 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?