2015년 7월 21일 화요일

[Selenium] getText() is not working


Sometimes I found that "driver.findElement(By.name("elementName"))  .getText()" returns null. Although there are texts on the webpage.

Then Try it 

driver.findElement(By.name("elementName")).getAttribute("textContent"))
In my case, It works!


댓글 없음:

댓글 쓰기