I have to think about it wrong.
I want to get the contents of an element, in this case a form field, on the page that I am accessing with Webdriver / Selenium 2
Here is my broken code:
Element=driver.find_element_by_id(ElementID) print Element print Element.text
here is the result:
<selenium.webdriver.remote.webelement.WebElement object at 0x9c2392c>
(Note the empty line) I know that the element has content, since I just typed them there with the previous command using .sendkeys, and I can see them on the actual web page while the script is running.
but I need to return the contents to the data.
What can I do to read this? Generally preferred so that I can extract content from various types of elements.
python selenium webdriver
Skip Huffman Apr 20 '12 at 18:26 2012-04-20 18:26
source share