File: examples.txt

package info (click to toggle)
twill 0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,472 kB
  • ctags: 1,916
  • sloc: python: 12,686; java: 98; makefile: 18; sh: 2
file content (33 lines) | stat: -rw-r--r-- 817 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
==============
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