How to get the attributevalue of the variable in the Rxpath?

Ask general questions here.
Jenny
Posts: 18
Joined: Thu Apr 14, 2016 5:04 pm

How to get the attributevalue of the variable in the Rxpath?

Post by Jenny » Mon Apr 25, 2016 1:21 am

Hi,

I have a variable called $varYear which is bound to a column "Year" in csv file. How do I access the value in that $varYear in the usercode?

Thanks,
Jenny

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

Re: How to get the attributevalue of the variable in the Rxpath?

Post by odklizec » Mon Apr 25, 2016 7:44 am

Hi Jenny,

All you need to do is to type the name of variable in UserCode of the module, in which is the variable binded in. So in your case, varYear (without '$'). If the variable is correctly binded to the recording/code module, once you start typing the text, the variable should be displayed in the code completion list of available methods, properties and variables. Hope this helps?
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