Getting InnerText from a Span

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
GranPapi
Posts: 5
Joined: Mon Jul 25, 2016 6:33 pm

Getting InnerText from a Span

Post by GranPapi » Wed Aug 10, 2016 6:11 pm

Hey guys! I'm new to Ranorex and I'm looking forward to do the following:

I'm creating a module that uses the "validate" action, and need to validate that the value shown on a table is matches to a given text string; the value shown in the table is contained in a span -and it's contained on the "innertext" property

How can I get Ranorex to get that InnerText?

Thanks in advance!

Vega
Posts: 222
Joined: Tue Jan 17, 2023 7:50 pm

Re: Getting InnerText from a Span

Post by Vega » Thu Aug 11, 2016 1:56 pm

While recording:

When you click validate and then click on an item, Ranorex spy will open and will highlight the selected element in the tree. Once you are sure this is the correct element press next. On the next screen you can choose what you are validating; you can see I have inner text selected:
validate.png
And here is what the generated step looks like in the action table of the recording:
validate2.png
You do not have the required permissions to view the files attached to this post.

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

Re: Getting InnerText from a Span

Post by odklizec » Thu Aug 11, 2016 2:26 pm

Hi,

Please post a Ranorex snapshot (not screenshot!) and the xpath to span element you are using.
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

GranPapi
Posts: 5
Joined: Mon Jul 25, 2016 6:33 pm

Re: Getting InnerText from a Span

Post by GranPapi » Fri Aug 12, 2016 5:39 pm

Thanks for your replies, guys!

Vega, your answer helped me a lot! It's working now :D