By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,362 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,362 IT Pros & Developers. It's quick & easy.

Unable to access textbox on an HTML form

P: 7
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:

Expand|Select|Wrap|Line Numbers
  2.  def login(self):
  3.         url = self._baseUrl + '/webapp/commerce/safilo/jsp/logon.jsp?lng=E&cpy=10'
  4., timeout=30.0)
  5.         self._br.select_form(name='logon') 
  6.         print 'entrou'
  7.         self._br.form['login'] = self._username
  8.         self._br.form['password'] = self._password
  9.         self._br.submit()
  11.         if self._verbose: print 'Login successful.\n'
  13.         self.last_logged_in =
  15. Traceback (most recent call last):
  16.   File "E:\billy\Projects\GlassInteg\trunk\src\", line 90, in <module>
  17.     go()
  18.   File "E:\billy\Projects\GlassInteg\trunk\src\", line 39, in go
  19.     ss = SafiloSupplier(updateBrands=True)
  20.   File "E:\billy\Projects\GlassInteg\trunk\src\GlassInteg\", line 283, in __init__
  21.     if login: self.login()
  22.   File "E:\billy\Projects\GlassInteg\trunk\src\GlassInteg\", line 307, in login
  23.     self._br.form['login'] = self._username
  24.   File "build\bdist.win32\egg\mechanize\", line 2780, in __setitem__
  25.   File "build\bdist.win32\egg\mechanize\", line 3101, in find_control
  26.   File "build\bdist.win32\egg\mechanize\", line 3185, in _find_control
  27. mechanize._form.ControlNotFoundError: no control matching name 'login'
Oct 10 '12 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,441
@ATNC33, we try to limit threads to one question each. Since this is a new question, I have branched it from the original thread:
Oct 10 '12 #2

P: 7
@Rabbit Thank you for your help! ;)
Oct 10 '12 #3

Expert 100+
P: 626
File "build\bdist.win32\egg\mechanize\", line 3185, in _find_control
mechanize._form.ControlNotFoundError: no control matching name 'login'
It appears there is no "login" on the form you are accessing. Print it to see what you have as the login page is apparently at a different location.
Oct 14 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.