How do I get the value of an element

Ask general questions here.
OPT-Liuxm
Posts: 35
Joined: Sat Jan 11, 2020 3:58 am

How do I get the value of an element

Post by OPT-Liuxm » Mon Jun 22, 2020 2:52 am

Hello, everyone!

May I ask...
About how to get the value of an element, such as text content or numeric size.

How should I operate?

Thanks. :D :D

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

Re: How do I get the value of an element

Post by odklizec » Mon Jun 22, 2020 5:52 am

Hi,

Could you please post a Ranorex snapshot of the element, from which you want to get the value? Without seeing the snapshots, all I can tell is that you need to use GetValue action, where you need to specify element’s attribute (InnerText, Text, Label, etc.), from which you want to get the value and a variable, where the value will be stored.
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

OPT-Liuxm
Posts: 35
Joined: Sat Jan 11, 2020 3:58 am

Re: How do I get the value of an element

Post by OPT-Liuxm » Mon Jun 22, 2020 7:08 am

I want to get this number and print it in the results report.
Get Value?I don't know how to use it.
Attachments
getTime.7z
(144.73 KiB) Downloaded 6 times
009.png
009.png (107.33 KiB) Viewed 208 times

OPT-Liuxm
Posts: 35
Joined: Sat Jan 11, 2020 3:58 am

Re: How do I get the value of an element

Post by OPT-Liuxm » Mon Jun 22, 2020 7:14 am

I seem to know how to use it. Just a moment, please. :D

OPT-Liuxm
Posts: 35
Joined: Sat Jan 11, 2020 3:58 am

Re: How do I get the value of an element

Post by OPT-Liuxm » Mon Jun 22, 2020 7:41 am

Yes, just use "get value". :D :D
thank you

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

Re: How do I get the value of an element

Post by odklizec » Mon Jun 22, 2020 7:56 am

Hi,

You are welcome ;)
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