Get html element content to string

  • 1 Replies
  • 1028 Views
Get html element content to string
« on: June 14, 2016, 10:05:30 am »
I am trying to extract the html/text content of a link <a> 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 ?

Re: Get html element content to string
« Reply #1 on: June 27, 2016, 19:25:52 pm »
Try using getElementById(...).innerText.

 

Sitemap 1 2 3 4 5 6 7 8