Hi. I am trying to create a program that automatically inputs text in a webpage input box.
It inputs the text properly, but first it needs to focus the text box properly.
Namely, when you manually enter the text, you normally first click on the input box, then input the text. In that way the box gets focused and the written text is black. - http://prntscr.com/1hu29e
However, when entering the text from the VB program, the text is entered in the box, but it is still grey. http://prntscr.com/1hu24t .. Because of that, the inputted text is not counted as valid and when the form is submitted, an error occurs saying that no info was entered. - http://prntscr.com/1hu2uw
The code that I am currently using:
WebBrowser1.Navigate("http://www.pagesjaunes.fr/") WebBrowser1.Document.GetElementById("quoiqui").Focus() WebBrowser1.Document.GetElementById("quoiqui").SetAttribute("Value", "Electricien")
Any suggestions on how to focus the box so it receives data properly? The site I am trying to do this is http://www.pagesjaunes.fr/ .
Thanks in advance!