I am not able to find the gettext
of the below code in the Selenium WebDriver.
<a id="551" class="blueTextNormal1 spc" onclick="sPh(this,'079');return false;" title="079">Country</a>
I want to get the value of Country. I tried using the xpath
:
driver.findElement(By.xpath("//*[@id='551']").getText())
but it is not returning any value. When I tried with
driver.findElement(By.xpath("//*[@id='551']")).getAttribute("title"))
I am getting the value as "079".
How can I to proceed?