0

getText() returns blank and getAttribute('textContent') returns null | in chrome v91 and on Mac machine.

getAttribute('textContent') works fine on Windows Chrome 91, but on mac and in chrome browser - its null and our scripts are failing in Mac machine.

Any help would be appreciated!

dheeraj
  • 324
  • 1
  • 9

2 Answers2

0

these might be different problems:

  1. getText return an empty string if the element is not visible, not scrolled to, etc.

  2. for null problem, read this answer https://stackoverflow.com/a/68075074/9150146

Sergey Pleshakov
  • 7,964
  • 2
  • 17
  • 40
  • Thanks and yes, no issues with chromedriver v90 and the issue with v91. So only solution is to downgrade chromedriver version? – dheeraj Jul 13 '21 at 07:57
0

This has been resolved with latest chromedriver, getAttribute('innerText') and getAttribute('textContent') that has given null in chromedriver v91, is working fine with latest v92.

dheeraj
  • 324
  • 1
  • 9