开发者

Possible to automate a web search?

Is it possible in a website search form to enter in series of searches? I have a list of destinations and would like to see if for eac开发者_Go百科h destination the search returns a result or throws an error.


I suggest you look into Watir - it allows automating the browser(possibly only IE, not sure) and is the tool to use for what you've described. You can go to a specified site, refer to HTML elements on the page and set their values (click buttons, fill search forms, etc).

It's also been ported into several other languages, such as #C (WatiN) and Java (WatiJ) and probably more.


My tool of choice for a problem like this would be to use Cucumber in combination with Capybara.

Cucumber is a nice DSL for writing out tasks such as these, although isn't strictly necessary for your problem.

Capybara is a browser simulator/driver wrapper for automated interaction with a website.

Both are well documented.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜