I've solved this problem... I had a little error on the path of the frame that i have to open to reach the form.
Now the form is being opened, but i can't find the login text box.
Can you help me @Rabbit?
Here is the code and the text message:
Now the form is being opened, but i can't find the login text box.
Can you help me @Rabbit?
Here is the code and the text message:
Code:
def login(self):
url = self._baseUrl + '/webapp/commerce/safilo/jsp/logon.jsp?lng=E&cpy=10'
self._br.open(url, timeout=30.0)
self._br.select_form(name='logon')
print 'entrou'
self._br.form['login'] = self._username
self._br.form['password'] = self._password
self._br.submit()
if self._verbose: print 'Login successful.\n'
self.last_logged_in = datetime.datetime.now()
Traceback (most recent call last):
File "E:\billy\Projects\GlassInteg\trunk\src\run.py", line 90, in <module>
go()
File "E:\billy\Projects\GlassInteg\trunk\src\run.py", line 39, in go
ss = SafiloSupplier(updateBrands=True)
File "E:\billy\Projects\GlassInteg\trunk\src\GlassInteg\Supplier.py", line 283, in __init__
if login: self.login()
File "E:\billy\Projects\GlassInteg\trunk\src\GlassInteg\Supplier.py", line 307, in login
self._br.form['login'] = self._username
File "build\bdist.win32\egg\mechanize\_form.py", line 2780, in __setitem__
File "build\bdist.win32\egg\mechanize\_form.py", line 3101, in find_control
File "build\bdist.win32\egg\mechanize\_form.py", line 3185, in _find_control
mechanize._form.ControlNotFoundError: no control matching name 'login'
Comment