Home > Blockchain >  Element.getText() returns empty string
Element.getText() returns empty string

Time:05-10

The below image shown that we have a field which is pre-populated from the api, and trying to automate that with that I am using the below command where once its available checking if not null.

enter image description here

<div  xpath="1"><input aria-invalid="false" disabled="" required="" type="text"  value="America First Credit Union"></div>

But getText() is returning empty string, I have checked its the right element and right amount of wait.

        return !element.getText().isEmpty();
}

CodePudding user response:

Please use

element = input tag

  return !element.getAttribute("value")

More detail here: getText() on input is not returning text

  • Related