Contains text in class using xpath not working

Ask general questions here.
vijaysimha
Posts: 2
Joined: Sun Jul 19, 2020 5:07 pm

Contains text in class using xpath not working

Post by vijaysimha » Mon Aug 10, 2020 4:47 pm

Hello Team,

:?: Contains text in class using xpath not working gives error and unable to proceed further with my script to complete test cases

Secondly :2 recordings one has variable as "A" ,here how to pass "A" to second recording script "A" ,basically passing as global variable not sure how to proceed its blocking my time.

Thanks
Vijaysimha
Attachments
ranre.png
ranre.png (91.83 KiB) Viewed 103 times

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

Re: Contains text in class using xpath not working

Post by odklizec » Mon Aug 10, 2020 8:17 pm

Hi,

At first, the xpath you are using is incorrect. I mean, ‘Contains’ keyword is not supported by Ranorex. The xpath should look like this: (Regex expression)...
//span[@class~‘(‘+$titleNumber+’)’]
Where the $titleNumber is a repo variable.

As for sharing data between modules, check this blogpost...
https://www.ranorex.com/blog/sharing-da ... o-another/
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