I need to take value from a table cell and it is identifying the element but not fetching the value out of it. I've tried:
$driver-> get_text('xpath')
and also
$driver->find_element('xpath').get_text();
None of these are working here.
HTML:
<td class="status">
<span class=" jira-issue-status-lozenge aui-lozenge jira-issue-status-lozenge-blue-gray jira-issue-status-lozenge-new aui-lozenge-subtle jira-issue-status-lozenge-max-width-medium"
data-tooltip="<span class="jira-issue-status-tooltip-title">Ready</span>" original-title="">Ready</span>
</td>
Here I need the text 'Ready'. I tried the following code:
#method 1
wait_until {print $driver->find_element('status','class_name')->get_text()};#also tried with xpath
------------------------------------------
#method 2
wait_until {$driver->get_text('//*[@id="issuerow102324"]/td[7]')};
I've turned on debug and I'm getting the following output.
Prepping findElement
Executing findElement
REQ: POST, http://localhost:4444/wd/hub/session/cf170460-4cef-45d1-8513-9a740d1ac82b/element, {"using":"xpath","value":"//*[@id=\"issuerow102324\"]/td[7]/span"}
RES: {"value":{"element-6066-11e4-a52e-4f735466cecf":"922a947e-af04-4973-9834-c05604e00266"}}
Prepping getElementText
Executing getElementText
REQ: GET, http://localhost:4444/wd/hub/session/cf170460-4cef-45d1-8513-9a740d1ac82b/element/922a947e-af04-4973-9834-c05604e00266/text, {}
RES: read timeout at C:/Perl64/lib/Net/HTTP/Methods.pm line 268.
Error while executing command: Server returned error message read timeout at C:/Perl64/lib/Net/HTTP/Methods.pm line 268.
instead of data at C:/Perl64/site/lib/Selenium/Remote/Driver.pm line 403.
at C:/Perl64/site/lib/Selenium/Remote/Driver.pm line 353.
Debug stucks at 'Executing getElementText' and after a while, it's printing the result: read timeout. I'm really not understanding where the problem is.