2

I'm trying to select a form with python, but it isn't working.

The page i am working with is: http://www.safilonet.safilo.com/

def login(self):
    url = self._baseUrl + '/webapp/commerce/safilo/jsp/logon.jsp'
    self._br.open(url, timeout=30.0)
    self._br.select_form('logon')   
    self._br.form['login'] = self._username
    self._br.form['password'] = self._password
    self._br.submit()

The error presented is:

File "build\bdist.win32\egg\mechanize\_mechanize.py", line 524, in select_form
mechanize._mechanize.FormNotFoundError: no form matching name 'logon'

Can you please help me? Thanks

Sufian Latif
  • 13,086
  • 3
  • 33
  • 70

0 Answers0