Automatic Checkout and GUI path changes since Ranorex 9.5

Ranorex Studio, Spy, Recorder, and Driver.
crUser
Posts: 2
Joined: Thu Oct 06, 2022 8:55 am

Automatic Checkout and GUI path changes since Ranorex 9.5

Post by crUser » Thu Oct 06, 2022 2:05 pm

We just upgraded from Ranorex 9.5.0 to 10.2.4 (Windows 10) and encountered some problems after the installation:

1) Our Ranorex files are under TFS source control. Since 10.2.4 the Ranorex solution cannot be opened when the rxsln file is not checked out. It has to be checked out manually. This wasn't necessary before. The error message is: Can't load file <filePath>. Check the file permission and the existence of that file. The exception button shows an 'UnauthorizedAccessException'. Does Ranorex not support auto check out for solutions anymore? It still can check out the recordings though.

2) Ranorex doesn't find our GUI elements anymore (apart from the main window of our application). Our application is white-listed and 'WPF Legacy' is set to 'WpfImprovedOnly' (no changes to the previous Ranorex installation). Ranorex Spy finds our GUI elements but the path it shows is different from the one we have been using. Has Ranorex changed the structure of its UI paths?

What can I do to solve these problems?

IvanF
Posts: 151
Joined: Thu Aug 11, 2022 8:55 pm

Re: Automatic Checkout and GUI path changes since Ranorex 9.5

Post by IvanF » Mon Oct 10, 2022 4:09 pm

Hi, you may need to submit this as a direct support ticket. A couple of considerations:

For the first question, are you running Studio with admin privileges? If yes, you may still need to reconnect it with TFS to make sure all the paths are properly recognized (i.e. remove from source control -> re-add to source control).

For the second question, could you please provide the "before" vs "after" of the path structure for the same element? Or provide more details about how they are different (more wildcards, different attributes, different domain, etc.)?

raygoel
Posts: 12
Joined: Tue Sep 15, 2020 3:38 pm

Re: Automatic Checkout and GUI path changes since Ranorex 9.5

Post by raygoel » Thu Oct 13, 2022 9:35 pm

I am curious about the OP's second question too. We are facing the same problem with the element paths. A lot of the older paths don't work anymore and when we spy on these elements the new path is structurally different and shorter from the previous rxpath.

As an example -
New path - /form[@automationid='']/tabpagelist[@automationid='tabControl']/?/?/button[@automationid='okButton']

Older path - /form[@title='Momentum Message - 1 Item']/tabpagelist[@automationid='tabControl']/?/?/picture[@automationid='messageIcon']/?/?/button[@automationid='okButton']

The paths definitely look 'neater' with 10.2.4, however it has broken a lot of our tests. Would be interested to know if there is an easier way to fix these paths other than manually spying on each of them.
Thanks,
Ray

IvanF
Posts: 151
Joined: Thu Aug 11, 2022 8:55 pm

Re: Automatic Checkout and GUI path changes since Ranorex 9.5

Post by IvanF » Mon Oct 17, 2022 6:49 pm

Unfortunately, blank automation ids (/form[@automationid='']) can quite often cause challenges and "title" can be a more reliable attribute. Therefore, the new path may not be better than the old one, stability-wise.

The issue overall could be caused by something that happened to plugins during the update to 10.2.x. I'd recommend submitting the direct support ticket to the Ranorex team with the snapshots, version details, and plugin/package settings. So that they could look into it in more detail.

When it comes to bulk updates, it seems like mostly the first path element is changing (presence of /picture[@automationid='messageIcon'] could be due to robustness settings being changed/treated differently and may not affect the execution as much).

If you are using rooted folders (ch.3 here - https://www.youtube.com/watch?v=qYYEDzw1fuU), you would only need to update the base path in 1 place. If not, your best bet could be opening the .rxrep file in a text editor of your choice and using string operations to find & replace in bulk.

crUser
Posts: 2
Joined: Thu Oct 06, 2022 8:55 am

Re: Automatic Checkout and GUI path changes since Ranorex 9.5

Post by crUser » Thu Oct 20, 2022 7:38 am

IvanF wrote:
Mon Oct 10, 2022 4:09 pm
Hi, you may need to submit this as a direct support ticket. A couple of considerations:

For the first question, are you running Studio with admin privileges? If yes, you may still need to reconnect it with TFS to make sure all the paths are properly recognized (i.e. remove from source control -> re-add to source control).

For the second question, could you please provide the "before" vs "after" of the path structure for the same element? Or provide more details about how they are different (more wildcards, different attributes, different domain, etc.)?
Thank you for your response.
Indeed, after removing the Ranorex solution file from source control and readding it solved the problem concerning auto-check out.

Concerning UI path changes: I cannot provide concrete examples of our paths. We decided not to upgrade now due to time limitations. We might come back later with this issue and will create a ticket then.

Thank you.