Updating Object path at Runtime

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
ankurm.245
Posts: 9
Joined: Fri Dec 14, 2018 5:26 am

Updating Object path at Runtime

Post by ankurm.245 » Fri Dec 14, 2018 5:58 am

Hi,

I am trying to traverse a tree structure which on every expansion of a root node, changes the DOM.
For Ex.
1. I need to click on Root1, then Xpath would be like below (with no child elements visible underneath):
li/a[@innertext='Root1']

2. I need to click on Root1>Child1, then Xpath would be like (with no child elements visible underneath Child1):
li[a[@innertext='Root1']]/ul/li/a[@innertext='Child1']

And so on.

I have created a object with just .//Li as path in repository and trying to update it accordingly to match it with the object i need to navigate to at run time.
LiTag Error.jpg

Using Below code to update the path of the element,
LiTag Error 3.jpg
but its throwing error as below:
LiTag Error2.jpg

Any help on how to work on dynamic path or create object at runtime with a specified path and object type?
You do not have the required permissions to view the files attached to this post.
I=AM!

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

Re: Updating Object path at Runtime

Post by odklizec » Fri Dec 14, 2018 9:45 am

Hi,

At first, some screenshots in your post are missing ;) And at next, please upload a Ranorex snapshot, which would be much more helpful than screenshots. Thanks.
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