python - How can I get actual text from an element that returns u'' when using element.text? -


here's html of element:

<input type="text" class="gcpia-ycorb gcpia-ychrb">

whenever try text element using element.text, returns u'' though element has text. there method can use actual text element?

element.text 

will return innerhtml of input element trying fetch. since input element not block level element, rather, uses value attribute store it's content, use alecxe had stated.

the_text = element.get_attribute('value') 

Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -