getText() method of selenium chrome driver sometimes returns an empty string

前端 未结 9 2118
感情败类
感情败类 2020-12-02 12:55

I have a curious case where the selenium chrome driver getText() method (java) returns an empty string for some elements, even though it returns a non-empty str

9条回答
  •  囚心锁ツ
    2020-12-02 13:42

    for (int count=0;count<=sizeofdd;count++)
    {       
       String GetInnerHTML=getddvalue.get(count).getAttribute("innerHTML");
    }
    

    where, 1. getddvalue is the WebElement 2. sizeofdd is the size of getddvalue

提交回复
热议问题