开发者

How can I click buttons on a web page? Java/C#

I've a very specific question: How can I click in certain buttons on a web page? Without that thing of coordinates. =D What I really want, is a script that search for a Button (or more) with specific name and clicks it.

Imagine: You open your browser and go to google page, than you run the script and, for example, it clicks the Search button.

If possible, I want a answer wich uses java or C#.

Thanks in advance for reading this, and sorry for my bad english.

Edit:

Ok. Assuming that I'll use WatiN, can you ra开发者_运维问答pidly explain how do I "put" this on my c# prog? I want WatiN to be running on a button_click event. Like: When you enter the URL on my prog and press "OK" the prog will click that especific button that I've told you before. Sorry if I've messed it up, I'me a truly noob with great ideas =s


For .NET, WatiN will do what you want. In fact, the very first example on the home page, shows you how to search google.


I WatiN all the time for screen scraping web sites: http://watin.sourceforge.net/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜