I've looked and tried all i can, i'm in need of assistance. I'm trying to get the text from an element in a page. Its a popup but not an alert or a new window, just another popup within a frame. WebDriver appears to find the element, but when i run the print statement to check the text returned, it is consistently a blank line. I've tried, instead of get_attribute, .text as well... no luck.
Here's the html:
<textarea id="textareafield-2320-inputEl" class="x-form-field x-form-text x-form-textarea" name="activityComments" rows="4" cols="20" autocomplete="off" aria-invalid="false" style="width: 100%;"></textarea>
Here's my code:
contents = driver.find_element_by_xpath(".//*[@class='x-form-item-input-row']/td[2]/textarea").get_attribute("value")
print contents
find_element_by_idinstead ofxpath. Did you try that?