Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 0fb563ab35f5e9fea6e9221912f4f4e9 > files > 140

twill-0.9-3mdv2010.0.noarch.rpm

==============
twill Examples
==============

Example: logging into slashdot.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This script logs you into slashdot (assuming you have an account!).  ::

    setlocal username <your username>
    setlocal password <your password>

    go http://www.slashdot.org/
    formvalue 1 unickname $username
    formvalue 1 upasswd $password
    submit

    code 200     # make sure form submission is correct!

Example: searching Google and going to the first hit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

*Please be aware that automated searching of Google violates their
Terms of Service.  This is for example purposes only!* ::

    setlocal query "twill Python"

    go http://www.google.com/

    fv 1 q $query
    submit btnI     # use the "I'm feeling lucky" button

    show