GetInnerHtml

Best practices, code snippets for common functionality, examples, and guidelines.
audatest
Posts: 1
Joined: Wed Nov 30, 2016 5:55 pm

GetInnerHtml

Post by audatest » Wed Nov 30, 2016 6:29 pm

Hi Ranorexers,

i am trying to do the following;
1. extract / get access to th the contents of a table on a webpage via GetInnerHtml
2. then use Regex to validate certain contents of the table

Using the spy i noticed "GetInnerHtml" works fine, but im not sure where the information is stored during testrun and how to access it and use it for the validation i need.

any help form of help will be very appreciated

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: GetInnerHtml

Post by odklizec » Tue Dec 06, 2016 11:24 am

Hi,

Please upload a Ranorex snapshot (not SCREENSHOT) of the table in question and also the xpath pointing to the element you want to access. It's pretty hard to suggest something reliable without (at least) snapshot. Small sample app/html sample would be even better, but in this case, snapshot should be just fine.

Also, are you sure there is not a better way to validate the content of the table/cell than getting inner HTML code from entire table? It sounds a bit like overkill/not very reliable solution? ;) Just post the snapshot and maybe we can suggest a better/more reliable way to validate the table?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration