You can test any web application with it; but if you are developing Seaside applications you can take a component (any component), and unit test that component.
Download screencast (800x600): .mpeg 15.0 MB, .mov 36.9 MB
View mobile version.
Voice recorded by Christoph Budzinski.
Load WebTester (note that it loads Seaside 3.0-rc):
Gofer new
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfWebTester';
load.
(ConfigurationOfAutotest project version:'1.1') load.
A WebTester session example:
|tester searchButton searchField|
tester := WtSeleniumWebTester new.
tester
appRoot: 'http://pharo-project.org';
browserType: '*firefox';
start;
openUrl: '/'.
searchField := tester textFieldById: 'searchfield'.
self assert: searchField isPresent.
searchButton := tester buttonByXPath: '//input[@title=''Search'']'.
self assert: searchButton isPresent.
searchField text: 'screencasts'.
searchButton click.
tester waitForPageToLoad.
self assert: (tester isTextPresent:'pharocasts').
tester stop.
Should ConfigurationOfAutotest in the 1st piece of code read ConfigurationOfWebTester instead?
ReplyDeleteThanks for this video.
If you want to use Autotest, yes. WebTester is not tied to Autotest. You can use the SUnit GUI to run tests.
ReplyDeleteYou can also right click on the test / class and select 'run tests'.