Item not found at runtime, but spy has no issues

Ranorex Studio, Spy, Recorder, and Driver.
dmconsulting1
Posts: 161
Joined: Fri Nov 08, 2019 3:23 pm

Item not found at runtime, but spy has no issues

Post by dmconsulting1 » Tue Feb 15, 2022 5:37 pm

I have a UI object mapped, it sees it just fine in Spy, but can't find it ever at runtime.

Failed to find item 'P38Repository.ApplicationUnderTest.ContentPanel.Stage_Delay_Time'.
No element found for path '/form[@processname='DrillApp']/container[@controlname='toolStripContainer1']/container[@controlname='contentPanel']/element[@controlname='']//element[@controlname='calibrationPages1']//container[@controlname='panel1']/container[@controlname='groupBox1']/table[@controlname='itemGridView']/element[@name='Row 25']/text[@uiautomationvaluevalue='Stage Delay Time']' at step 'element[@controlname='']' after 113 attempts within 32s.
spyFound.png
spyFound.png (46.82 KiB) Viewed 319 times

From Spy
/form[@processname='DrillApp']/container[@controlname='toolStripContainer1']/container[@controlname='contentPanel']/element[@controlname='']//element[@controlname='calibrationPages1']//container[@controlname='panel1']/container[@controlname='groupBox1']/table[@controlname='itemGridView']/element[@name='Row 25']/text[@uiautomationvaluevalue='Stage Delay Time']

dmconsulting1
Posts: 161
Joined: Fri Nov 08, 2019 3:23 pm

Re: Item not found at runtime, but spy has no issues

Post by dmconsulting1 » Tue Feb 15, 2022 6:07 pm

Spy is defaulting to an automation id that seems to be randomly generated at runtime, so you can't use that even though it doesn't make sense anyway.
spyAutomationID.png
spyAutomationID.png (49.61 KiB) Viewed 314 times

I was using the text value of the field but for some reason Ranorex sees it differently, it shows as "Row 25, Not Sorted" and the test displayed is "Stage Delay Time"