开发者

Possible to automate a web search?

开发者 https://www.devze.com 2023-01-04 07:50 出处:网络
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

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

精彩评论

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