c# - Select specific text boxes on WebBrowser and write in them -
how select specific text box on web browser (the default c# webbrowser) , write string in it? have been thinking of webrequests may illegal due amount of packets send host server.
if wanting fill in field, need use dom. here examples assume browser named browser
, has navigated google.com.
wpf
mshtml.ihtmldocument2 htmldoc = browser.document mshtml.ihtmldocument2; ((mshtml.htmlinputelement)htmldoc.all.item("lst-ib")).value = "wpf web browser access dom";
winforms
htmldocument htmldoc = browser.document; htmldoc.all["lst-ib"].innertext = "c# web browser access dom";
Comments
Post a Comment