Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an equivalent of Don Libes's *expect* tool for scripting interaction with web pages?

In the bad old days of interactive console applications, Don Libes created a tool called Expect, which enabled you to write Tcl scripts that interacted with these applications, much as a user would. Expect had two tremendous benefits:

  • It was possible to script interactions that otherwise would have had to be repeated by hand, tediously. A classic example was dialup Internet access hell (from the days before PPP).

  • It was possible to write scripts to test one's own interactive applications, programmatically, as part of a regression suite.

Today most interactive applications are on the web, not on the console. Hence my question: is there any tool that provides the ability to interact with web pages and web forms programmatically, much as Expect provides the ability to interact with console applications programmatically?

(The closest thing I am aware of is Chickenfoot.)

like image 619
Norman Ramsey Avatar asked Mar 04 '09 04:03

Norman Ramsey


2 Answers

You might be looking for Selenium

like image 114
Logan Capaldo Avatar answered Sep 29 '22 12:09

Logan Capaldo


I've used Selenium RC in conjunction with Python to drive web page interactions programmatically. This has allowed me to write pretty extensive user tests in which forms and inputs are driven and their results are measured.

Check out the Selenium IDE on Firefox (as mentioned above). It allows you to record tests in the browser and play them back, either using the IDE itself, or the Remote Control app.

like image 42
bedwyr Avatar answered Sep 29 '22 11:09

bedwyr