Menu with submenus

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
sheafox
Posts: 33
Joined: Mon Jul 09, 2018 3:54 am

Menu with submenus

Post by sheafox » Fri Aug 31, 2018 8:38 pm

I am having trouble clicking the items on a submenu of another submenu. For example I am trying to write code to click menu->submenu 1 item -> submenu 2 item. Everything I have written so far will click the first submenu 1 item but not the next submenu 2 item. Any suggestions on how to properly do this ?

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

Re: Menu with submenus

Post by Stub » Mon Sep 03, 2018 8:50 am

I've structured some of our nested sub-menus as folders under the top-level menu repository item. So I click on say 'Date' at the top-level, wait a bit, then click on one of the repository sub-menu items that I've placed in a folder.

In other cases our AUT creates a new contextmenu with a different name/RxPath. So I invoke the top-level menu, wait for that repository item to exist, click on the nested sub-menu item, then I wait for the sub-menu repository item to exist before clicking on the required sub-menu item.

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

Re: Menu with submenus

Post by odklizec » Mon Sep 03, 2018 9:55 am

Hi,

Have you tried to record the actions? Simply record them and then, if really necessary, convert them to user code. But honestly, there is definitely no need to write everything in code. Using recordings, with well structured repository, makes the automation development faster and much less error prone. Recorded actions are automatically validated and converted to code, so there is a very little chance of user errors.
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