TestProject Forum
Powered by leading experts in the test automation community

Get html element content to string

I am trying to extract the html/text content of a link so that I can compare/assert its value.

if I try to access the .text() or innerHTML attribute with selenium I get nothing

How can I retrieve the innerHTML of an element ?

Try using getElementById(…).innerText.