Hello Robert,
Sorry for the long reply delay.
This information migh be useful for someone.
I have Ranorex 5.0.2.17874 installed.
Refimid is located in the file .rxrep
This was my case where the search control failed.
Code: Select all
<item
name="SaveRx"
id="e90f9c55-8f48-4807-a55b-75dd36d3e0e6"
searchtimeout="30000ms"
capname="button"
refpath="/form[@automationid='c92f2fb4abc249f98b2165ad8d529a31']/toolbar[2]/button[@automationid='f20d7ebdb11447c8bcff9dc3455c94f7']"
addcaps="button,uiautomation,uiautomationinvoke"
refimgid="667695f7-4e59-4c7c-8985-29d7601a608b">
/form[@automationid='c92f2fb4abc249f98b2165ad8d529a31']/?/?/button[@automationid='f20d7ebdb11447c8bcff9dc3455c94f7']
</item>
When I changed automationid='f20d7ebdb11447c8bcff9dc3455c94f7' to another id, the highlighting was fine.
refpath was also changed and it looks that everything was fine.
But, the toolbar id also changed and this made is impossible to find it at runtime.
This is the final control after the refactoring and putting “Simple” as the Ranorex XPath generation mode
Code: Select all
<item
name="SaveRx"
id="e90f9c55-8f48-4807-a55b-75dd36d3e0e6"
searchtimeout="30000ms"
capname="button"
addcaps="button,uiautomation,uiautomationinvoke"
refimgid="bcca3ffa-e44a-4b89-b2b8-238eb09d3064">
/form[@automationid='c92f2fb4abc249f98b2165ad8d529a31']/toolbar[@automationid='5263a93a2e314639bf59272b83eaa16c']/button[@automationid='f20d7ebdb11447c8bcff9dc3455c94f7']
</item>
<item
We can see that this id is now explicit and looking at the right button.
You can correct me if I’m wrong, but it looks like the highlight from Spy or Ranorex Studio is not using the same path at runtime.
If this is the case, I don’t mind the different paths, but a warning or something that shows me that the paths might not match.
Wiktor