Track menu item in multiples instances

Ask general questions here.
bastien
Posts: 7
Joined: Tue Sep 03, 2019 1:53 pm

Track menu item in multiples instances

Post by bastien » Tue Sep 03, 2019 2:13 pm

Hi,

I run two instances of one application on windows.
Ranorex see instance one, and intance two of this application (sunsetafsec) when i navigate in menu item. But when i navigate in the menu item to tracking items1, item2, ranorex create a new repository item. But this repository has not instance. And he can't locate the context menu or just the fisrt instance when i launch the test.
Help! :D
Attachments
Ouvrir_Screenshot_c227c4a6-f53a-40d3-96f3-52a93b1df8b1.jpg
Ouvrir_Screenshot_c227c4a6-f53a-40d3-96f3-52a93b1df8b1.jpg (6.52 KiB) Viewed 731 times
Fichier_Screenshot_ffa8741a-1d8f-4625-b889-aabdb9cecfb3.jpg
Fichier_Screenshot_ffa8741a-1d8f-4625-b889-aabdb9cecfb3.jpg (3.02 KiB) Viewed 731 times
Capture.PNG
Capture.PNG (51.02 KiB) Viewed 731 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Track menu item in multiples instances

Post by odklizec » Wed Sep 04, 2019 1:14 pm

Hi,

Could you please explain, in more details, what exactly you trying to achieve? It's not typical to run two instances of the same app at the same time. You will most probably have to manually add instance number to repository elements of your choice and eventually, create two sets or repo elements, differentiated by instance numbers (add Instance attribute to each root element).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

bastien
Posts: 7
Joined: Tue Sep 03, 2019 1:53 pm

Re: Track menu item in multiples instances

Post by bastien » Thu Sep 05, 2019 9:02 am

Hi,

I must launch two instances of the same app, because this is a simulator for TCP machine. When i track the menuitem "file(fichier)", Ranorex create two items repository with differents instances, but when i want to track "open(ouvrir)" in the menuitem "file(fichier)", Ranorex create another new repository item without instances and without link with the item repository who track "file(fichier)".

So when i run the test, Ranorex find just one instance of "open(ouvrir)"

Thanks for help.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Track menu item in multiples instances

Post by odklizec » Thu Sep 05, 2019 9:19 am

Hi,

Please post a Ranorex snapshot (NOT screenshot) from both apps as well as example of xpaths from repository. Generally speaking, you will most probably have to copy existing repository element for "file(fichier)" menu and add new instance manually.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

bastien
Posts: 7
Joined: Tue Sep 03, 2019 1:53 pm

Re: Track menu item in multiples instances

Post by bastien » Thu Sep 05, 2019 2:02 pm

attachements
Attachments
menuitemfichiers.PNG
menuitemfichiers.PNG (57.85 KiB) Viewed 691 times
itemsouvrir.PNG
itemsouvrir.PNG (34.15 KiB) Viewed 691 times
Fichier_Screenshot_e5dc8587-a047-4305-bece-f125c4541e90.jpg
Fichier_Screenshot_e5dc8587-a047-4305-bece-f125c4541e90.jpg (3.04 KiB) Viewed 691 times

bastien
Posts: 7
Joined: Tue Sep 03, 2019 1:53 pm

Re: Track menu item in multiples instances

Post by bastien » Thu Sep 05, 2019 2:34 pm

next
Attachments
Ouvrir_Screenshot_248a2fed-02c9-44dc-8a27-fe7d59ffbb6f.jpg
Ouvrir_Screenshot_248a2fed-02c9-44dc-8a27-fe7d59ffbb6f.jpg (6.47 KiB) Viewed 684 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Track menu item in multiples instances

Post by odklizec » Thu Sep 05, 2019 3:01 pm

Hi,

These are screenshots ;) Please post snapshots.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

bastien
Posts: 7
Joined: Tue Sep 03, 2019 1:53 pm

Re: Track menu item in multiples instances

Post by bastien » Thu Sep 05, 2019 3:55 pm

The last two are snapshot.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5071
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Track menu item in multiples instances

Post by odklizec » Thu Sep 05, 2019 5:53 pm

Hi,

I’m afraid, they are not. Please learn how to create a snapshot here:
https://www.ranorex.com/help/latest/ran ... hot-files/
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

bastien
Posts: 7
Joined: Tue Sep 03, 2019 1:53 pm

Re: Track menu item in multiples instances

Post by bastien » Fri Sep 06, 2019 9:24 am

My bad,
Attachments
ouvrir.PNG
ouvrir.PNG (45.09 KiB) Viewed 666 times
Fichier.rxsnp
(113.94 KiB) Downloaded 5 times

User avatar
Vega
Posts: 161
Joined: Mon Jul 11, 2016 2:15 pm

Re: Track menu item in multiples instances

Post by Vega » Tue Sep 10, 2019 1:01 am

It's hard to see the exact RxPath you are using for the image, are you able to paste it here? Mostly interested in the top level form object 'SunsetAfsec'. Are you already using the instance attribute for the parent object? It sounds like you want to send input to two different instances and differentiate between them. Maybe something like this:
farms44.png
farms44.png (6.64 KiB) Viewed 632 times
All the child elements will inherent from the parent, so this should allow you to target a specific instance:
farms9999.png
farms9999.png (29.87 KiB) Viewed 632 times


Hope this helps

bastien
Posts: 7
Joined: Tue Sep 03, 2019 1:53 pm

Re: Track menu item in multiples instances

Post by bastien » Tue Sep 17, 2019 2:28 pm

Hi,

My problem is that i can make intances for the menu item "fichier" but when i try to track the menu item "ouvrir" (it is sub menu item of "fichier"), Ranorex create another parent repository and i dont know if i can move this reposirory as a child of the "fichier repository".

Like there is 2 parents repository, Ranorex can't track the menu item "ouvrir" because "ouvrir" is not a child of the parent menu item "fichier".

I hope my explications are better.

Thanks

User avatar
Vega
Posts: 161
Joined: Mon Jul 11, 2016 2:15 pm

Re: Track menu item in multiples instances

Post by Vega » Fri Sep 20, 2019 6:16 pm

Hi

The item ouvrir is not within the provided snapshot so I cannot make an exact sample but the solution should be the same. You can drag and drop repository items from Spy to your repository to place them where needed. So once you have your parent objects setup with the proper instance, you should be able to drag and drop to your repository. I created the below from the provided snapshot using drag and drop:
fumez.png
fumez.png (9.47 KiB) Viewed 20 times
If the above doesnt work, you can also convert "Ficier" to a rooted folder and place ouvrir as a sub item. This will cause ouvrir to inherit the base path from its parents:
fumez2.png
fumez2.png (9.29 KiB) Viewed 20 times
fumez4.png
fumez4.png (38.71 KiB) Viewed 20 times
hope this helps