473,386 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Web automation with twill

Hi all,
this post is a kind of continuation of my
"Expanding Python as a macro language"

Among the replies gmi...@gmail.com directed me to:
http://www.idyll.org/~t/www-tools/twill.html
(a python tool with a language to script "web commands")

I applied twill to a problem I had solved "by hand"
clicking 220 times on a button and saving the data sent
by the server (it is an "asp" file).

In this case web automation is needed!
I need the help of some expert or of the author (Titus Brown).

The asp file is (I am Italian!):
http://www.scienzemfn.unito.it/job_p...o_completo.asp
If you open it you see a button with "Page Down" that must be clicked
to get all the data in chunks.

I used twill (vers. 0.7.3) in interactive mode:
twill-sh -u
http://www.scienzemfn.unito.it/job_p...o_completo.asp
or twill-sh ... and then >>go webaddress

With "show" you see the the list of the html file representing
the 1st chunk (page 1 of 223)
With "showforms" you obtain:
Form #1
## __Name______ __Type___ __ID________ __Value___
PageNo hidden (None) 1
1 Mv submit (None) Page Down
Form #2
## __Name______ __Type___ __ID________ __Value___
PageNo hidden (None) 1
None button (None) None
1 Mv submit (None) Page Down

Using twill you can access the following page and save it by:
fv 1 "Mv" "Page down"
submit
save_html file_name
with >> showforms you obtain:
Form #1
## __Name______ __Type___ __ID________ __Value___
PageNo hidden (None) 2
1 Mv submit (None) Page Down
2 Mv submit (None) Page Up
Form #2
## __Name______ __Type___ __ID________ __Value___
PageNo hidden (None) 2
None button (None) None
1 Mv submit (None) Page Down
2 Mv submit (None) Page Up
Beeing the second page a further button shows up ("Page Up")

But now I get lost... I am not able to load the 3rd page...
In fact repeating the aforementioned sequence: fv ... + submit

the button activated by the "submit" command is "Page Up"!

Any help?

IMHO, twill is great ...expecially if we can make it work
outside from its first use (automatic web testing).
I must also say that it can be called as a module...

Bye.

Nov 2 '05 #1
6 2400
You might want to post your question to the twill mailing list. Info
about the list is available at <http://lists.idyll.org/listinfo/twill>

Grig

Nov 2 '05 #2
I solved the problem by myself with the classical
method of newbyes (trial and error).
Bye.

Nov 2 '05 #3
BTW, O'Reilly just published an article of mines on twill:

http://www.onlamp.com/pub/a/python/2.../03/twill.html

Michele Simionato

Nov 4 '05 #4
Hi Michele,
I taught to be the smartest in town!
But when the experts take the field it is better that us newbies
retire in good order...
Thank you for your article and, with respect to Grig Gheorghiu
(another expert), I must apologize for having be a little rude.

I hadn't discovered in Internet your contributions because I
hardly read the first 10 hits of a search.
I need web automation also for that (in order to elaborate more search
results reducing then my help requests and mainly my useless posts).

By the way, are you aware that C. Titus Brown (twill's author)
tells "peste e corna" of Zope?
Bye.

Nov 4 '05 #5
qwwwee:
By the way, are you aware that C. Titus Brown (twill's author)
tells "peste e corna" of Zope?


No, but I am not surprised. I also say "peste e corna" of Zope ;)
In general I am an anti-frameworks guy (in good company with
many Pythonistas including Guido).

Michele Simionato

Nov 4 '05 #6
Hi Michele,
I only made the observation about Zope, because I hoped to
hear a different point of view as you are/were involved in
web development using Zope/Plone (as referred in your article...).
Besides that, at a Linux Day, I followed a presentation of
Zope/Plone framework, which stroke me a lot.
Bye.

Nov 4 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: qwweeeit | last post by:
Hi all, Elliot Temple on the 1 June wrote: > How do I make Python press a button on a webpage? I looked at > urllib, but I only see how to open a URL with that. I searched > google but no...
1
by: Jimmer | last post by:
I've got what should be an easy automation problem, but the solution simply isn't coming to me. I've got several public variables set up for automation as follows: Public gappExcel As...
1
by: Lee Seung Hoo | last post by:
hi~ :) I need all information of "Automation" or "Automation Object" what is that ? why is it useful ? How can I use that by C# or .Net Framework ?
0
by: Sharath | last post by:
Quality Globe is Glad to Offer you the Fast Track course on Automation, QTP Basics and Advanced, and Quality Center Starting Date: June 4th, 2007 Timings: 10 AM to 3:30 PM Duration: 50 Hours ...
0
by: Sharath | last post by:
"Inspired" by the huge success of our first two automation fast track batches We are forced to start third fast track automation batch ...
0
by: Sharath | last post by:
We are glad to inform you that "Inspired" by the huge success of our first three automation fast track batches We are forced to start fourth fast track automation batch ...
2
by: mullaiselvan | last post by:
i tried some wedsites for twill in python environmet but i get a package and can't install in the wondows OS
0
by: Sharath | last post by:
We are glad to inform you that "Inspired" by the huge success of our first four automation fast track batches We are forced to start fifth fast track automation batch ...
2
by: aditi1184 | last post by:
Hi, I am trying to use the 'find' command of twill from within a python code but it seems to return no result. I tried to run that command on the command prompt by running twill and it works fine....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.