What I wanted:
1. I wanted app to goto web page - Which it does
2. Copy text from input box into search bar of imdb - Which it does
3. Then for app to automatically click button - Which it doesn't
Here is what app looks like

Here is code I have used in app

Here is code I have used in app
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Width = Me.Width
WebBrowser1.Height = Me.Height - 10
End Sub
Private Sub Start_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Start.Click
WebBrowser1.Navigate("http://www.imdb.com/")
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Dim txt As HtmlElement = WebBrowser1.Document.GetElementById("q")
txt.SetAttribute("value", TextBox1.Text)
Dim btn As HtmlElement = WebBrowser1.Document.GetElementById("go")
btn.InvokeMember("click")
End Sub
End Class
Extra info:
I know howto click button when button has a name.
But in the case of IMDB.com they do not for their search button...
They have a class and a type but not a name
Code Below is source for search bar on IMDB's website
<input id="navbar-query" name="q" type="text" value="" autocomplete="off" /> <button class="nb_primary" type="submit">Go</button><noscript> <a href="/search/">More</a></noscript>
<div id="navbar-suggestionsearch"></div>
How do i make it click search button automatically
Any Help is very appreciated thank you
1. I wanted app to goto web page - Which it does
2. Copy text from input box into search bar of imdb - Which it does
3. Then for app to automatically click button - Which it doesn't
Here is what app looks like

Here is code I have used in app

Here is code I have used in app
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Width = Me.Width
WebBrowser1.Height = Me.Height - 10
End Sub
Private Sub Start_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Start.Click
WebBrowser1.Navigate("http://www.imdb.com/")
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Dim txt As HtmlElement = WebBrowser1.Document.GetElementById("q")
txt.SetAttribute("value", TextBox1.Text)
Dim btn As HtmlElement = WebBrowser1.Document.GetElementById("go")
btn.InvokeMember("click")
End Sub
End Class
Extra info:
I know howto click button when button has a name.
But in the case of IMDB.com they do not for their search button...
They have a class and a type but not a name
Code Below is source for search bar on IMDB's website
<input id="navbar-query" name="q" type="text" value="" autocomplete="off" /> <button class="nb_primary" type="submit">Go</button><noscript> <a href="/search/">More</a></noscript>
<div id="navbar-suggestionsearch"></div>
How do i make it click search button automatically
Any Help is very appreciated thank you
Last edited: