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
Post a Comment