I have an windows application (xceed Wpf wizard). There are some buttons. I am not able to identify if "Show All Elements" is set to False.

However when i set true, I am able to identity but it adds many attribute in the path. is there other way to handle the path or identify the buttons without adding unwanted element[pos()=0]/container[pos()=0].

I know this can be place ?/? marks instead of /element[pos()=0]/container[pos()=0]. But any other way please or any other settings.

RxPath:

/form[@automationid='AppWindow' and @wpfnative='True' and @name='AppWindow']/container[@automationid='PART_Control' and @name='PART_Control']/element[pos()=0]/container[pos()=0]/container[@automationid='PART_WorkArea' and @name='PART_WorkArea']/element[pos()=0]/container[pos()=0]/list[@automationid='wizard' and @name='wizard']/element[pos()=8]/container[pos()=0]/element[pos()=3]/container[pos()=0]/container[pos()=0]/button[@automationid='PART_BackButton' and @name='PART_BackButton' and @text='Back']

If the required elements are not visible/trackable via Spy with "Show All Elements" set as "false", then there is most probably no other way how to work with them. Please post a Ranorex snapshot of the element(s) in question both with "Show All Elements" enabled and disabled. Without snapshot, it's pretty hard (often impossible) to suggest something reliable.

So, apparently, "Show All Elements" set as "true" is a must for this app. And I think it's safe to ignore most of the elements (and attributes too) within the xpath. In other words, you can reduce the xpath to bare minimum, like this: