The automated test case getText() cannot get the value of an element

Problem Description

An element on the page cannot get its value. Getting the element's value with getText() returns null or empty.

 

 

root cause

? Need to know more about dom structure

 

Solution

Use the method getAttribute("value") to get the value of the element value.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324900076&siteId=291194637