开发者

How do I emulate an image button click in .NET WebBrowser control with x and y click coordinates?

I'm trying to automate using a remote ASP.NET website using the .NET WebBrowser control to simulate user input.

I'm trying to call InvokeMember("click") on an image button on the remote site but it doesn't appear to be working and I suspect it is because the X,Y click coordinates that are submitted are both 0,0 (rather than representing real click coordinates).

Is there any way I can programmatically set the submitted x,y coordinates to emulate a real click?

(BTW I know I'm selecting the correct HTML element on the page so I've exhausted all other possible reasons why this is not working other than the 开发者_如何学编程x,y coords!)


Is there a requirement to use the .net web browser control directly? It may be more time efficient to start using a web automation framework such as Selenium or Watin. I found both to be simple enough to use with a little digging in the documention. Trying to handle and debug the web browser control events will drive you insane.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜