getAttribute of hidden element. Python.

1,364 views
Skip to first unread message

ecarrera

unread,
Jun 11, 2012, 2:54:41 PM6/11/12
to Selenium Users
Hi,

i'm trying to get the attributte of a hidden element, but it throws an
error when try to get it.

The code is simply, as common sense:


driver.find_element_by_id('captcha').getAttribute('value')



Yeap, the element is 'captcha', so the page is really fool.

In the form the hidden element looks like:


<input type="hidden" name="captcha" id="captcha"
value="5635s" size="6" />



So I want to put this value into the 'captcha2' element to verify the
captcha.

AttributeError: 'WebElement' object has no attribute
'getAttribute'

Luke Inman-Semerau

unread,
Jun 11, 2012, 5:17:49 PM6/11/12
to seleniu...@googlegroups.com
In python it's  .get_attribute('value')


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Reply all
Reply to author
Forward
0 new messages