[twill] Problem with file upload using formfile

Swati Bendale swati at gs-lab.com
Mon Jul 17 04:33:24 PDT 2006


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" <titus at caltech.edu>
To: "Swati Bendale" <swati at gs-lab.com>
Cc: <twill at lists.idyll.org>; <titus at idyll.org>
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 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: recording error.txt
Url: http://lists.idyll.org/pipermail/twill/attachments/20060717/a49068e1/recordingerror.txt


More information about the twill mailing list