List Info

Thread: How can I automate a task like open browser and click a button?




How can I automate a task like open browser and click a button?
user name
2006-12-24 21:58:07
Hi,



How can I automate a task like open a new browser add a text
to a textBox
and click a button from a webForm?



From winForm it dose like this:



            HTMLDocument myDoc = new HTMLDocumentClass();

            myDoc = (HTMLDocument) axWebBrowser1.Document;



            HTMLInputElement otxtSearchBox =
(HTMLInputElement)
myDoc.all.item("q", 0);

            otxtSearchBox.value = "intel corp";



            HTMLInputElement btnSearch = (HTMLInputElement)
myDoc.all.item("btnI", 0);

            btnSearch.click();



Thanks,

Lior.




===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )