From bbelder at yahoo.com Mon Dec 8 15:36:35 2008 From: bbelder at yahoo.com (Blake Elder) Date: Mon, 8 Dec 2008 15:36:35 -0800 (PST) Subject: [twill] twill on XP Message-ID: <840688.66621.qm@web57603.mail.re1.yahoo.com> Greetings Running WinXP. The problem: I cannot start via "twill-sh". Instead I run python, then run: >>>import twill.shell >>>twill.shell.main() After that all is well. My configuration details: Python is here: c:\Python25. Twill is here: C:\Tools\Twill\twill-0.9 Path is: C:\Ruby\bin;C:\tools\twill\;C:\Python25\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;c:\tools\Twill\twill-0.9 I would like to be able to start twill via "twill-sh". Thanks very much, B. Elder From barry.hart at predictix.com Tue Dec 9 04:57:03 2008 From: barry.hart at predictix.com (Barry Hart) Date: Tue, 9 Dec 2008 07:57:03 -0500 (EST) Subject: [twill] twill on XP In-Reply-To: <840688.66621.qm@web57603.mail.re1.yahoo.com> References: <840688.66621.qm@web57603.mail.re1.yahoo.com> Message-ID: <6434AA09336F40738A44954B58BC2B60@PDXBH1> How did you install Twill? I used easy_install and it automatically created the following files in my \python25\scripts directory: 08/05/2008 02:23 PM 176 twill-fork 08/05/2008 02:23 PM 267 twill-sh-script.py 08/05/2008 02:23 PM 6,656 twill-sh.exe Barry -----Original Message----- From: twill-bounces at lists.idyll.org [mailto:twill-bounces at lists.idyll.org] On Behalf Of Blake Elder Sent: Monday, December 08, 2008 6:37 PM To: twill at lists.idyll.org Subject: [twill] twill on XP Greetings Running WinXP. The problem: I cannot start via "twill-sh". Instead I run python, then run: >>>import twill.shell >>>twill.shell.main() After that all is well. My configuration details: Python is here: c:\Python25. Twill is here: C:\Tools\Twill\twill-0.9 Path is: C:\Ruby\bin;C:\tools\twill\;C:\Python25\;%SystemRoot%\system32;%SystemRoot %;%SystemRoot%\System32\Wbem;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;c:\tools\Twill\twill-0.9 I would like to be able to start twill via "twill-sh". Thanks very much, B. Elder _______________________________________________ twill mailing list twill at lists.idyll.org http://lists.idyll.org/listinfo/twill -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.idyll.org/pipermail/twill/attachments/20081209/e65520f7/attachment.htm From strohsch at gmail.com Sat Dec 13 12:18:33 2008 From: strohsch at gmail.com (Dave Strohschein) Date: Sat, 13 Dec 2008 15:18:33 -0500 Subject: [twill] Problems logging into an .ASP page Message-ID: <5a61207f0812131218p26eab13fh9dc9ac0bdc88bed7@mail.gmail.com> Hello all, I'm new to TWILL and to this forum, but I hope someone can help me. BACKGROUND: I am in the Civil Air Patrol and I am trying to download weekly updates (using TWILL) of member status. The webpage that I am trying to log into is https://wmu.nat.cap.gov/Login.asp?. I start up Twill within the Python IDLE and use the following commands and obtain the included results (shown below '--------------------'). I store my username and password in the values: CAPIDbox and Textbox1, respectively. Then I try to "submit" using Button3. The problem is shown at the end after I try to submit. I get the following error: ERROR: IgnoreControl instance has no attribute '_click' current page: https://wmu.nat.cap.gov/Login.asp? NOTE: I have logged into this page manually repeated times via an actual browser. So what do I need to do to login????? Thanks in advance for the help. Dave strohsch at gmail.com --------------------------------------------------------------------------------------------------------------------------- twill.shell.main() >> go https://wmu.nat.cap.gov/Login.asp? ==> at https://wmu.nat.cap.gov/Login.asp? current page: https://wmu.nat.cap.gov/Login.asp? >> show

 

Home

Welcome to the Wing Management Utilities
Click Here for Instructions to this system

Web User Entry Validation Form

Enter Your CAPID:
Enter Your Password:


Warning! The information you are receiving is protected from interception or disclosure. Any person who intentionally distributes, reproduces, or discloses its contents is subject to the penalties set forth in 18 United States Code Section 2511 and/or related state and federal laws of the United States.

current page: https://wmu.nat.cap.gov/Login.asp? >> showforms Form name=thisForm (#1) ## ## __Name__________________ __Type___ __ID________ __Value__________________ 1 CAPIDbox text CAPIDbox 2 Textbox1 password Textbox1 3 Button3 button Button3 None 4 Button4 button Button4 None 5 Button5 button Button5 None 6 _method hidden (None) 7 _Button1_state hidden (None) _bVisible=false&value=Create%20Password 8 _Label2_state hidden (None) _strCaption=Enter%20Your%20CAPID%3A 9 _CAPIDbox_state hidden (None) _bVisible=true&_nColumnCount=20&_nMa ... 10 _Label1_state hidden (None) _strCaption=Enter%20Your%20Password%3A 11 _Textbox1_state hidden (None) _bVisible=true&_nStyle=2&_nColumnCou ... 12 _Button3_state hidden (None) value=Submit 13 _Button4_state hidden (None) value=Clear 14 _Button5_state hidden (None) value=Forgot%20your%20password%3F 15 _errorMessageBox_state hidden (None) _bVisible=false&_strCaption= 16 _Label3_state hidden (None) _bVisible=false&_strCaption=undefined 17 _menuQuery_state hidden (None) _bVisible=false&_strCaption=undefined 18 _thisPage_state hidden (None) current page: https://wmu.nat.cap.gov/Login.asp? >> formvalue 1 CAPIDbox $CAPIDbox current page: https://wmu.nat.cap.gov/Login.asp? >> formvalue 1 Textbox1 $Textbox1 current page: https://wmu.nat.cap.gov/Login.asp? >> submit Button3 Note: submit is using submit button: name="Button3", value="None" ERROR: IgnoreControl instance has no attribute '_click' current page: https://wmu.nat.cap.gov/Login.asp? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.idyll.org/pipermail/twill/attachments/20081213/36016267/attachment.html From nwilliams at leapfrogonline.com Mon Dec 15 07:36:20 2008 From: nwilliams at leapfrogonline.com (Nat Williams) Date: Mon, 15 Dec 2008 09:36:20 -0600 Subject: [twill] Problems logging into an .ASP page In-Reply-To: <5a61207f0812131218p26eab13fh9dc9ac0bdc88bed7@mail.gmail.com> Message-ID: On 12/13/08 2:18 PM, "Dave Strohschein" wrote: > > Hello all, > I'm new to TWILL and to this forum, but I hope someone can help me. > BACKGROUND: I am in the Civil Air Patrol and I am trying to download weekly > updates (using TWILL) of member status. > The webpage that I am trying to log into is > https://wmu.nat.cap.gov/Login.asp?. > I start up Twill within the Python IDLE and use the following commands and > obtain the included results (shown below '--------------------'). > I store my username and password in the values: CAPIDbox and Textbox1, > respectively. > Then I try to "submit" using Button3. > > The problem is shown at the end after I try to submit. I get the following > error: > > ERROR: IgnoreControl instance has no attribute '_click' > current page: https://wmu.nat.cap.gov/Login.asp? > > NOTE: I have logged into this page manually repeated times via an actual > browser. > > So what do I need to do to login????? > > Thanks in advance for the help. > Dave > strohsch at gmail.com Dave, Try just using submit without specifying 'Button3'. The submit command will remember what form you've been filling out, and gets a little cranky when you try to be explicit. Nat CONFIDENTIALITY NOTE The document(s) accompanying this e-mail transmission, if any, and the e-mail transmittal message containing information from Leapfrog Online Customer Acquisition, LLC is confidential or privileged. The information is intended to be for the use of the individual(s) or entity(ies) named on this e-mail transmission message. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this e-mail is prohibited. If you have received this e-mail in error, please immediately delete this e-mail and notify us by telephone of the error. From macarse at gmail.com Tue Dec 16 11:36:28 2008 From: macarse at gmail.com (Macarse) Date: Tue, 16 Dec 2008 17:36:28 -0200 Subject: [twill] twill with threads Message-ID: <481377830812161136p12cdcefbh6ce6ffa877ce9d13@mail.gmail.com> Hi, I am doing a script that: - Gets a list of ips - Sets a threadpool - With twill it logins to the http - with urlib2 gets some html The code that it's run in the threads looks like this: def checkIP(ip): global results, resultsLock ret = False req = urllib2.Request( ip ) try: response = urllib2.urlopen(req) homePage = response.read() #login go(ip + '/login.asp') fv('1', 'user', 'user') fv('1', 'password', 'password') submit('3') req = urllib2.Request(ip + '/status.asp') response = urllib2.urlopen(req) statusPage = response.read() resultsLock.acquire() results.write(ip) resultsLock.release() except URLError, e: ret = False except BadStatusLine, e: ret = False return ret my question is: Is ok to use twill like that? Is it thread safe? Thanks for reading! From ctb at msu.edu Wed Dec 17 21:03:38 2008 From: ctb at msu.edu (C. Titus Brown) Date: Wed, 17 Dec 2008 21:03:38 -0800 Subject: [twill] twill with threads In-Reply-To: <481377830812161136p12cdcefbh6ce6ffa877ce9d13@mail.gmail.com> References: <481377830812161136p12cdcefbh6ce6ffa877ce9d13@mail.gmail.com> Message-ID: <20081218050337.GD25068@idyll.org> On Tue, Dec 16, 2008 at 05:36:28PM -0200, Macarse wrote: -> Hi, I am doing a script that: -> - Gets a list of ips -> - Sets a threadpool -> - With twill it logins to the http -> - with urlib2 gets some html Hi, -> #login -> go(ip + '/login.asp') -> fv('1', 'user', 'user') -> fv('1', 'password', 'password') -> submit('3') -> -> req = urllib2.Request(ip + '/status.asp') -> response = urllib2.urlopen(req) -> statusPage = response.read() You could do this with twill easily enough -- just do browser = twill.commands.browser statusPage = browser.get_html() -> my question is: Is ok to use twill like that? -> Is it thread safe? ...however, unfortunately, the commands interface in twill is not thread safe, and mechanize (which twill uses to actually do anything :) may also not be threadsafe. best, --titus -- C. Titus Brown, ctb at msu.edu From james.cameron at hp.com Wed Dec 17 21:09:25 2008 From: james.cameron at hp.com (James Cameron) Date: Thu, 18 Dec 2008 16:09:25 +1100 Subject: [twill] twill with threads In-Reply-To: <20081218050337.GD25068@idyll.org> References: <481377830812161136p12cdcefbh6ce6ffa877ce9d13@mail.gmail.com> <20081218050337.GD25068@idyll.org> Message-ID: <20081218050924.GG4286@hp.com> On Wed, Dec 17, 2008 at 09:03:38PM -0800, C. Titus Brown wrote: > On Tue, Dec 16, 2008 at 05:36:28PM -0200, Macarse wrote: > -> go(ip + '/login.asp') > -> fv('1', 'user', 'user') > -> fv('1', 'password', 'password') > -> submit('3') > > You could do this with twill easily enough -- just do > > browser = twill.commands.browser > statusPage = browser.get_html() Yesterday I noted fv wasn't easily available, so I cut and paste it from commands.py. There's an opportunity to make that more available. Sorry I have no patch yet. -- James Cameron http://ftp.hp.com.au/sigs/jc/ From barry.hart at predictix.com Thu Dec 18 04:27:11 2008 From: barry.hart at predictix.com (Barry Hart) Date: Thu, 18 Dec 2008 07:27:11 -0500 (EST) Subject: [twill] twill with threads In-Reply-To: <20081218050337.GD25068@idyll.org> References: <481377830812161136p12cdcefbh6ce6ffa877ce9d13@mail.gmail.com> <20081218050337.GD25068@idyll.org> Message-ID: <5A1637BDD355401BB0C259DC75382C54@PDXBH1> We've been using Twill recently to do volume testing of a web site. Each simulated user is a separate CPython process running Twill. The processes are lightweight enough that a single ordinary PC with 2GB of RAM can easily simulate dozens of users. Barry -----Original Message----- From: twill-bounces at lists.idyll.org [mailto:twill-bounces at lists.idyll.org] On Behalf Of C. Titus Brown Sent: Thursday, December 18, 2008 12:04 AM To: Macarse Cc: twill at lists.idyll.org Subject: Re: [twill] twill with threads On Tue, Dec 16, 2008 at 05:36:28PM -0200, Macarse wrote: -> Hi, I am doing a script that: -> - Gets a list of ips -> - Sets a threadpool -> - With twill it logins to the http -> - with urlib2 gets some html Hi, -> #login -> go(ip + '/login.asp') -> fv('1', 'user', 'user') -> fv('1', 'password', 'password') -> submit('3') -> -> req = urllib2.Request(ip + '/status.asp') -> response = urllib2.urlopen(req) -> statusPage = response.read() You could do this with twill easily enough -- just do browser = twill.commands.browser statusPage = browser.get_html() -> my question is: Is ok to use twill like that? -> Is it thread safe? ...however, unfortunately, the commands interface in twill is not thread safe, and mechanize (which twill uses to actually do anything :) may also not be threadsafe. best, --titus -- C. Titus Brown, ctb at msu.edu _______________________________________________ twill mailing list twill at lists.idyll.org http://lists.idyll.org/listinfo/twill -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.idyll.org/pipermail/twill/attachments/20081218/c811679c/attachment.html