Question

I am trying to fill in my user name and password on this site: https://www.imleagues.com/Login.aspx

From there, I want to submit it and log in. I have been able to click the login button, but it tells me I have incorrect username and password. How should I go about filling these in? I thought I had it using this:

URL = 'https://www.imleagues.com/Login.aspx'
address = "http://www.imleagues.com/School/Team/Home.aspx?Team=27d6c31187314397b00293fb0cfbc79a"


b = spynner.Browser()
b.show()
b.load(URL)
b.wk_fill('input[name=ctl00$ContentPlaceHolder1$inUserName]', '******')
b.wk_fill('input[name=ctl00$ContentPlaceHolder1$inPassword]', '******')

but apparently this doesn't work. Thanks for any help.

Was it helpful?

Solution

This works for me:

import spynner
URL = 'https://www.imleagues.com/Login.aspx'
address = "http://www.imleagues.com/School/Team/Home.aspx?Team=27d6c31187314397b00293fb0cfbc79a"

b = spynner.Browser()
b.show()
b.load(URL)
b.runjs('$("#ctl00_ContentPlaceHolder1_inUserName").val("testUser")')
b.runjs('$("#ctl00_ContentPlaceHolder1_inPassword").val("testPass")')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top