javascript - C# open hidden browser and navigate -


i code opening browser window whichever default , navigate website make click on image. tried many google search since extreme newbie c# couldn't achieve result. want make textbox timer display mouse position give in x,y coordinate make mouse click.

here code tried.

var ie = (shdocvw.webbrowser)activator.createinstance(type.gettypefromprogid("internetexplorer.application"));         ie.visible = false; //for testing purpose make visible.         ie.navigate("http://www.google.com");          location.x = cursor.position.x;         location.y = cursor.position.y;          console.writeline("x: " + cursor.position.x + " y: " + cursor.position.y); 

please me.

in .net have webbrowser control https://msdn.microsoft.com/en-us/library/w290k23d(v=vs.110).aspx

all need create instance of control, make invisible (or size 0)

and navigate using api: https://msdn.microsoft.com/en-us/library/w6t65c4y(v=vs.110).aspx

once navigated able query document , invoke clicks invokemember("click") in webbrowser control

hope helps.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -