Automatic login to website (newbie)
phishboh at gmail.com
phishboh at gmail.com
Wed May 16 07:47:33 EDT 2007
On 15 Mai, 16:25, "Tim Williams" <t... at tdw.net> wrote:
> The frame URL ishttp://www.expekt.com/contenttop.jsp, you could try
> navigating directly to the frame to see if it helps
>
> website = "http://www.expekt.com/contenttop.jsp"
> ie.navigate(website)
> ie.textBoxSet('user', 'MyLogin')
> ie.textBoxSet('pass', 'MyPassword')
> ie.buttonClick('actn')
Thanks a lot, it helped! (after also changing the last line to
ie.buttonClick('login'))
Next, I'd like to follow links within the website, but I ran into
similar problems again.
The following code navigates me to the desired website:
# python.org
ie = cPAMIE.PAMIE()
website = "http://www.python.org"
ie.navigate(website)
ie.textBoxSet('q', 'pamie')
ie.buttonClick('submit')
ie.linkClick('Agile Testing with Python Test Frameworks')
But nothing happens when using the any of the linkClick commands in
the code below (I'd like to click the "odds" link in the upper menu):
# expekt.com
ie = cPAMIE.PAMIE()
website = "http://www.expekt.com/eng"
ie.navigate(website)
ie.linkClick(' odds')
#ie.linkClick('odds')
#ie.linkClick('http://www.expekt.com/livebetting/index.jsp')
#ie.linkClick('subMenusport1')
I guess that I have to do something like "in the frame called 'menu',
follow the link called 'odds'" (and similar for login; in the frame
called 'contenttop', enter 'MyLogin' in the text box called 'user' and
'MyPassword' in the text box called 'pass').
Any ideas on how to accomplish this?
Code samples (and/or documentation) to
* launch IE (succeeded: IE =
win32com.client.DispatchEx('InternetExplorer.Application.1'))
* navigate to website (succeeded: IE.Navigate(website))
* fill in specific text box(es) in specific frame(s) and submit (need
support)
* follow specific link(s) in specific frame(s) (need support)
using win32.client (or PAMIE or other) would be very welcome!
Any help highly appreciated. Thanks!
More information about the Python-list
mailing list