|
Hello Everyone, I am a new to Twill. I have been using Python to
automate most of my testing tasks in the last 4-5 years. My current
project is to develop a tool to login to a local secure website, which use
apache to authenticate accessing user. I Google the web and fumble on
this “Testing Web Apps Effectively with Twill”. After reading
the article and others related posts, I believe this is the perfect tool for my
project. I just want to login to the website, navigate to some selected
links, fill and submit some forms and retrieve the response for my posts. I have written a simple script to login a secure website
which use a “Login” form and it work perfectly. Until I try
to go to the website that uses Apache for the authentication step – just
popup window and no form to fill. I can use URLILB2 to loggin, but I have
not been figure out how to gain access to this website using the Twill for its
wonderful built in feature. Below is the code I use to login using URLLIB2: handler =
urllib2.HTTPBasicAuthHandler()
handler.add_password(self.realm, domain, userId, password) opener =
urllib2.build_opener(handler)
urllib2.install_opener(opener) httpPage =
urllib2.urlopen(url) Any idea / suggestion would be greatly appreciated. Thank you very much in advance for your help, H. Pham |
_______________________________________________ twill mailing list [email protected] http://lists.idyll.org/listinfo/twill
