Changes

Jump to: navigation, search

Bugzilla:QA

264 bytes added, 15:42, 9 December 2006
Scripts called by a Perl program
==== Scripts called by a Perl program ====
The installation and configuration are a bit harder. First download and install [http://search.cpan.org/~mbarbonlukec/Test-WWW-Selenium/ Test::WWW::Selenium] as well as all its . In case you still use version 0.03, the following modules are required modulestoo:
requires:
Test::More v0.47
When all these modules are installed, you will also need the SeleniumTest.pm module available in [https://bugzilla.mozilla.org/show_bug.cgi?id=317695 bug 317695] which is a simplified version of the one given with the Test-WWW-Selenium tarball. An example of a test script - 012qa.t - is also provided (012qa.t), which can e.g. be executed with runtests.pl, a Perl script available in the Bugzilla distribution.
For newer versions of Test::WWW::Selenium, requirements are different and SeleniumTest.pm is no longer required. Note that your old scripts running on 0.03 won't run on newer versions anymore. As you can see, the syntax is differentbetween HTML and Perl scripts, but the commands remain mostly the same. Make sure to end all your commands by "_ok" to generate an output on your screen. The format is now $test->command_name_ok('field', 'value', 'description'), where $test is the test object created by SeleniumTest.pm and which will do the interface between your test script and the web installation.
The description is optional, but gives very useful information. A typical output is of the form:
Confirm
683
edits

Navigation menu