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

Lior Levy <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.web
Message-ID <[email protected]>
 

 

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.