473,321 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Unable to access textbox on an HTML form

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
  1.  
  2.  def login(self):
  3.         url = self._baseUrl + '/webapp/commerce/safilo/jsp/logon.jsp?lng=E&cpy=10'
  4.         self._br.open(url, 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()
  10.  
  11.         if self._verbose: print 'Login successful.\n'
  12.  
  13.         self.last_logged_in = datetime.datetime.now()
  14.  
  15. Traceback (most recent call last):
  16.   File "E:\billy\Projects\GlassInteg\trunk\src\run.py", line 90, in <module>
  17.     go()
  18.   File "E:\billy\Projects\GlassInteg\trunk\src\run.py", line 39, in go
  19.     ss = SafiloSupplier(updateBrands=True)
  20.   File "E:\billy\Projects\GlassInteg\trunk\src\GlassInteg\Supplier.py", line 283, in __init__
  21.     if login: self.login()
  22.   File "E:\billy\Projects\GlassInteg\trunk\src\GlassInteg\Supplier.py", line 307, in login
  23.     self._br.form['login'] = self._username
  24.   File "build\bdist.win32\egg\mechanize\_form.py", line 2780, in __setitem__
  25.   File "build\bdist.win32\egg\mechanize\_form.py", line 3101, in find_control
  26.   File "build\bdist.win32\egg\mechanize\_form.py", line 3185, in _find_control
  27. mechanize._form.ControlNotFoundError: no control matching name 'login'
  28.  
Oct 10 '12 #1
3 2549
Rabbit
12,516 Expert Mod 8TB
@ATNC33, we try to limit threads to one question each. Since this is a new question, I have branched it from the original thread: http://bytes.com/topic/python/answers/943035-error-form.
Oct 10 '12 #2
ATNC33
7
@Rabbit Thank you for your help! ;)
Oct 10 '12 #3
dwblas
626 Expert 512MB
File "build\bdist.win32\egg\mechanize\_form.py", 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

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

Similar topics

3
by: sammmista | last post by:
hello experts, Plz dont treat this as another newbie query , i did my homework but still getting nowhere :( :( :( Trying to learn PHP on Fedora core 1 (PHP 4.3,MySQL,HTTPD).Unable to post data...
3
by: Nancy | last post by:
Hi, Guys, I am new to Python. I am trying to following the example on http://www.modpython.org/live/current/doc-html/tut-pub.html In this example, it gives the following html code, <form...
3
by: Jim Adams | last post by:
My ASP.Net (VB.Net) app needs to display a filled in form to a web user from the following: a) read a form files dynamically from disk (e.g. form1.html) b) read its corresponding XML file (e.g....
3
by: Samuel Shulman | last post by:
I would like to refer to HTML elements from my ASP.NET code do they have to be server side If yes then I can I set their html name for the POST method Thank you, Samuel
3
by: hugo | last post by:
Hi, I have a function that I call from form fields using the OnKeyUp function to replace special caracters. Once this function has been called, it does not set the focus on the form field where...
1
by: burtell | last post by:
Previously, I wrote: I have designed an HTML form. The name of each element corresponds to a heading in an Access database on my computer. Is there a way for me to program the HTML form to send the...
0
by: Manoj Mittal | last post by:
hi I want to access the Html control i.e Textbox .which is in seperate file and want to access in seperate ASP.NET file .. how I can access the control of Html control in ASP.NetPage.. ...
1
by: johnacooke | last post by:
I have a HTML form that is generated in part by PHP. The action attribute on the form tag calls itself, so that I can validate the fields without using any other form of code like Javascript to...
9
by: dhtml | last post by:
I have written an article "Unsafe Names for HTML Form Controls". <URL: http://jibbering.com/faq/names/ > I would appreciate any reviews, technical or otherwise. Garrett --...
1
by: Keith Pastorek | last post by:
So I have a form that has an array passed in. When generating the online form, I loop through the array and create the same text boxes for each value in the array. So my text boxes (relating to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.