Popup dialog with the same names

Ranorex Studio, Spy, Recorder, and Driver.
cliffae2020
Posts: 6
Joined: Fri Jul 16, 2021 3:38 am

Popup dialog with the same names

Post by cliffae2020 » Thu Aug 12, 2021 4:33 am

Hello,

Currently I have 2 actions to close 2 popup dialogs.

Action 1: Click OK button (for 1st popup)
//after clicking the OK button, a second popup dialog will appear in front of the first dialog, so basically the first dialog will not close.
Action 2: Click OK button (for 2nd popup)
//after clicking the OK button, both the first and second popup dialog will close.

I run the actions but the second action fails to close the second pop dialog which leaves the 2 popup dialog being displayed and not closed.
As I check the repository, I found out that both popup dialogs share the same repository. Both dialogs have the same title in the title bar.

Is there a way to separate the repository used for each dialog? Is there a work around for this matter?

User avatar
Stub
Posts: 471
Joined: Fri Jul 15, 2016 1:35 pm

Re: Popup dialog with the same names

Post by Stub » Thu Aug 12, 2021 8:17 am

You might be able to use some attribute on each of the dialogs that differentiates them from each other - size, Z-order, or even a particular control that is unique to one over the other. Then modify the RxPath to the dialog to include that differentiating attribute.

Fergal
Certified Professional
Certified Professional
Posts: 441
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Popup dialog with the same names

Post by Fergal » Thu Aug 12, 2021 2:25 pm

Try editing the repo item for the OK button to make it visible and enabled. That way the test should click on the OK button in the active / enabled dialog.
Attachments
enabled.JPG
enabled.JPG (22.3 KiB) Viewed 629 times

cliffae2020
Posts: 6
Joined: Fri Jul 16, 2021 3:38 am

Re: Popup dialog with the same names

Post by cliffae2020 » Fri Aug 13, 2021 6:02 am

The problem is now fixed.
Thanks Stub and Fergal, your suggestions fixed the problem.

Fergal
Certified Professional
Certified Professional
Posts: 441
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Popup dialog with the same names

Post by Fergal » Fri Aug 13, 2021 12:35 pm

You're welcome cliffae2020, glad you got it resolved.