Scripts executed from a web browser and those called from a Perl script use a different syntax, the first ones being pure HTML, the second ones being written using Perl language.
=== Scripts run running from a web browser ===
This is the easiest way to use Selenium. After having downloaded and untar'ed the tarball (we still use version 0.6.0 despite 0.8.1 is out, for compatibility issues), scripts simply consist of a table with three columns (command, field, value). A template is available in [https://bugzilla.mozilla.org/show_bug.cgi?id=317695 bug 317695] (template.html), as well as a useful Javascript file for most common actions (user-extensions.js).