selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Text() not always working

Open Kur-Ich opened this issue 3 years ago • 2 comments
trafficstars

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

Kur-Ich avatar Aug 13 '22 10:08 Kur-Ich

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.

tonyquang avatar Apr 06 '24 00:04 tonyquang

Got the same issue, work correctly if element is displayed

gbatanov avatar Jun 07 '24 10:06 gbatanov