-
May 17th, 2014, 06:10 PM
#1
Use WebBrowser to submit data
Hey,
I am trying to submit data using the vb6 webbrowser control.
In the case of google it is quite easy:
Right click the textbox and select inspect element which reveals the textbox name to be "q"
Right click the google submit button which reveals the button's name to be "btnG"
So the code to submit data to the google search engine is:
Code:
WebBrowser1.Document.All("q").focus
WebBrowser1.Document.All("q").Value = "Enter the Search Lookup"
WebBrowser1.Document.All("btnG").focus
WebBrowser1.Document.activeElement.Click
However, it is not always that easy. For example, how to submit a reply to this site?
I tried:
WebBrowser1.Document.All("quick_reply").focus
WebBrowser1.Document.All("quick_reply").Value = "A Reply"
However, setting the value that way didn't work.
Same when I tried using:
WebBrowser1.Document.getElementById("cke_contents_vB_Editor_QR_editor").value
Error in both cases: 'Object does not support this property or method'
Although submitting a reply is easy:
Code:
WebBrowser1.Document.All("sButton").focus
WebBrowser1.Document.activeElement.Click
Last edited by Witis; May 17th, 2014 at 06:57 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|