tebeka / selenium

Selenium/Webdriver client for Go
MIT License
2.51k stars 410 forks source link

Text() not always working #297

Open Kur-Ich opened 2 years ago

Kur-Ich commented 2 years ago

Hi, I have series of webelements like this one: <span class="WSJTheme--headlineText--He1ANr9C ">Rocket Lab Is Already Science, Not Fiction </span> source: https://www.wsj.com/news/heard-on-the-street?mod=nav_top_subsection

However, the .Text() method doesn't work on all of them, it only works on a few. Is there another way to try to get the inner text?

Many thanks

tonyquang commented 5 months ago

Got the same issue, but when you call element.Screenshot(true) before you call Text() you can get the value). But don't know the root cause yet.

gbatanov commented 3 months ago

Got the same issue, work correctly if element is displayed