While trying to print values present with in strong tag using xpath I'm getting following exception:
org.openqa.selenium.NoSuchElementException: Unable to locate element: strong
This is my code :
WebElement eleText = driver.findElement(By.xpath("//strong"));
String testerName = eleText.getText();
System.out.println(testerName);
This is my webpage which I'm trying to get values within strong tag :
<a id="id_1099808326" class="activity">
<strong>heizil</strong> :
<label id="check_label"> " First Device Test"
</label>
<a id="id_1099808296" class="activity">
<strong>riya</strong>:
<label id=check_label"> " Second Device Test"
</label>
Expected output: heizil,riya
If this is not the proper way can any one suggest any other way of getting the values present in <strong>
tag