c# Web Browser simulate button press -


i'm using webbrowser control , want bypass button press on web page. i'm not familiar html , web pages, i'm wondering if has solution.

the button i'm talking on web page: http://www.movshare.net/video/ut55cfdvg5wgj/?

the button appearing @ random might not there always.

edit: thinking this, can of c#. updated.

get reference button , invoke it's click() javascript method:

htmlelement btn = mybrowsercontrol.document.getelementbyid("mybutton"); /* alternatively, take @ these other methods retrieving htmlelement: htmldocument.getelementfrompoint(point point) htmldocument.getelementsbytagname(string tagname) htmldocument.all.getelementsbyname(string name) */ btn.invokemember("click"); 

this work in browsers if ...
since webbrowser control, don't need worry cross browser issues.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -