I want to show in Extent Report the name of the web element ("USER_LOGIN" in my example); how do I get it?
I tried to use the getText()
but it replies with a blank as result.
For example this is site code:
<input class="form_control w100p ffg big" type="text"
name="USER_LOGIN" value="lpelet2@gmail.com" maxlength="255" placeholder="E-mail">
and this is what I'm trying to do:
public void verifyElementExist(WebElement weElem) throws ParserConfigurationException, SAXException, IOException
{
try
{
weElem.isDisplayed();
extnTest.log(LogStatus.INFO, "Element exist - " + weElem.getText());
}
catch (Exception e)
{
...
}
}