Variable at Path Editor

Ask general questions here.
douglas.velho
Posts: 13
Joined: Wed Dec 06, 2017 8:33 pm

Variable at Path Editor

Post by douglas.velho » Mon Mar 18, 2019 8:05 pm

Hi everyone

It's possible add a value that get an variable at Path Editor ?
Example; I have a field type input text....when i see at Path Editor, his name is ...../dom[@caption='Qualitor Web']//input[#'vlinformacaoadicional1055']....so, this value 1055, can change, could be 1056,1057,etc....
I try to change:...../dom[@caption='Qualitor Web']//input[#'vlinformacaoadicional']...but it cannot find.
Is how to set something like this ..../dom[@caption='Qualitor Web']//input[#'vlinformacaoadicional+variable'].... ??
Ranorex 5.4.6 - Win Server 2016
Thanks
Douglas
Attachments
change_value.rxsnp
(339.17 KiB) Downloaded 6 times

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

Re: Variable at Path Editor

Post by odklizec » Mon Mar 18, 2019 8:33 pm

Hi,

Unique Id (#) does not support variables or regular expressions. You must change the xpath like this...

Code: Select all

dom[@caption='Qualitor Web']//input[@id~'vlinformacaoadicional']
Or with variable, like this...

Code: Select all

dom[@caption='Qualitor Web']//input[@id='vlinformacaoadicional' + $variable]
Last edited by odklizec on Mon Mar 18, 2019 9:54 pm, edited 1 time in total.
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

douglas.velho
Posts: 13
Joined: Wed Dec 06, 2017 8:33 pm

Re: Variable at Path Editor

Post by douglas.velho » Mon Mar 18, 2019 8:54 pm

Thank you, i will try and reply soon.

douglas.velho
Posts: 13
Joined: Wed Dec 06, 2017 8:33 pm

Re: Variable at Path Editor

Post by douglas.velho » Tue Mar 19, 2019 3:10 pm

Hi odklizec , it´s work.
Thanks for help.