filling a form on internet !
-
hi guys , i`m new in C# and now have a problem :) i wanna open a web page , then get it`s form (my perpose page has 1 form) then fill the form , and click the button ! :-D the textbox of user name , is named : "e5ba6b5" see , i did this :
webBrowser1.Navigate("http://mysite.com"); HtmlElementCollection htm = webBrowser1.Document.Forms; HtmlElementCollection user = htm.GetElementsByName("e5ba6b5");
is it true ?! and how should i fill username and click the button ?! :wtf:
-
hi guys , i`m new in C# and now have a problem :) i wanna open a web page , then get it`s form (my perpose page has 1 form) then fill the form , and click the button ! :-D the textbox of user name , is named : "e5ba6b5" see , i did this :
webBrowser1.Navigate("http://mysite.com"); HtmlElementCollection htm = webBrowser1.Document.Forms; HtmlElementCollection user = htm.GetElementsByName("e5ba6b5");
is it true ?! and how should i fill username and click the button ?! :wtf:
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/a85407b6-c95a-4b80-849f-cae03aedaf92[^] maybe this helps. use a visualB to visual C# translator http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]
Bad = knowing 2 much
-
hi guys , i`m new in C# and now have a problem :) i wanna open a web page , then get it`s form (my perpose page has 1 form) then fill the form , and click the button ! :-D the textbox of user name , is named : "e5ba6b5" see , i did this :
webBrowser1.Navigate("http://mysite.com"); HtmlElementCollection htm = webBrowser1.Document.Forms; HtmlElementCollection user = htm.GetElementsByName("e5ba6b5");
is it true ?! and how should i fill username and click the button ?! :wtf:
Do you have to use C# for this? I do things like this a lot, as I write test automation suites for websites. I would use the AutoITv3 scripting language, http://www.autoitscript.com. It should take you all of ten minutes to do something simple like this, and the scripts compile directly .exe. Take a look :)