Hi Titus,
Sorry for delay in reply. As I was busy automating other stuff which had
higher priority, I could not send you the twill traffic recording and the
browser traffic recording.
I followed the procedure as mentioned by you on Windows. I downloaded the
wsgirwef package. But it seems there is some problem running the
run-recording-proxy.py.
1) If I do not provide the option values on the command prompt, I get an
empty twill-traffic.pickle file even after browsing to the application with
upload functionality (here I edited the run-recording-proxy.py file at line
no.18 and 20 to change the default host and port number).
2) When I provide the option values at command prompt I get error. I am
attaching the error lines I get while running the run-recording-proxy.py
with this e-mail.
Please direct me as to what to do next or please let me know any additional
steps to be followed on Windows to get the run-recording-proxy.py file
running successfully.
Best regards.
Swati
----- Original Message -----
From: "Titus Brown" <[EMAIL PROTECTED]>
To: "Swati Bendale" <[EMAIL PROTECTED]>
Cc: <[email protected]>; <[EMAIL PROTECTED]>
Sent: Sunday, July 09, 2006 6:34 AM
Subject: Re: [twill] Problem with file upload using formfile
-> The file upload works fine for both IE and Firefox so i guess this is
not
-> browser related issue.
->
-> I am presently doing regression automation using Twill and needs to
-> complete it ASAP. As I am required to get this issue (uploading of file
-> using formfile command in the Twill script) resolved at urgent basis,
could
-> you please direct me as to what needs to be done ( like change the
source
-> code to fix this issue). In this way I can contribute to Twill and get
the
-> issue of uploading file using twill script resolved for me as well.
->
-> Could you please let me know your views on the above ASAP.
hi, Swati, let me elaborate on my previous post.
If you would like to help fix twill so that your formfile upload works,
then I need to figure out *exactly* what the problem is. In particular,
it's necessary to figure out how the twill/mechanize file upload is
different from the IE/Mozilla file upload.
If you do the following, it will let me figure out precisely what the
difference is.
1. Download and unpack scotch:
http://darcs.idyll.org/~t/projects/scotch-latest.tar.gz
(conveniently the scotch documentation doesn't tell you where to
get the source code. Oops, I'll fix that...)
2. Run the scotch recording proxy, to record the twill traffic:
cd scotch-latest
bin/run-recording-proxy twill-traffic.pickle
3. Set the http_proxy environment variable for twill:
export http_proxy='http://localhost:8000'
4. Run your twill script(s) to do the file upload.
5. kill the recording proxy (CTRL-C will exit it & save the results)
6. Start a new recording proxy to record your browser traffic:
bin/run-recording-proxy browser-traffic.pickle
7. Change your browser proxy settings to use localhost, port 8000.
8. Do the file upload through your browser.
9. Exit the recording proxy.
Once you've done this, you can send me the entire pickles. (If you
have sensitive Internet accessible hosts etc. and you don't want
to give me the passwords, let me know; I can show you how to extract
just the request/response that you care about.) At this point I'll
know exactly what is different about the request and response, and
I can either fix it myself in twill or mechanize or go bug the mechanize
author.
I should be able to get to this pretty quickly, so let me know if/when
you'll be able to record the traffic.
thanks,
--titus
C:\Pythontest\scotch-latest\bin>run-recording-proxy.py --host='http://172.20.25.
207' --port=8081 twill-traffic.pickle
Traceback (most recent call last):
File "C:\Pythontest\scotch-latest\bin\run-recording-proxy.py", line 48, in ?
httpd = WSGIServer((options.host, options.port), MyRequestHandler)
File "C:\Pythontest\lib\SocketServer.py", line 330, in __init__
self.server_bind()
File "C:\PYTHON~2\SCOTCH~1\bin\wsgiref\simple_server.py", line 50, in server_b
ind
HTTPServer.server_bind(self)
File "C:\Pythontest\lib\BaseHTTPServer.py", line 101, in server_bind
SocketServer.TCPServer.server_bind(self)
File "C:\Pythontest\lib\SocketServer.py", line 341, in server_bind
self.socket.bind(self.server_address)
File "<string>", line 1, in bind
socket.gaierror: (11001, 'getaddrinfo failed')
_______________________________________________
twill mailing list
[email protected]
http://lists.idyll.org/listinfo/twill