Detecting items and executing them without prior recording

Ranorex Studio, Spy, Recorder, and Driver.
Alvaro Tavares
Posts: 5
Joined: Thu May 20, 2021 9:45 am

Detecting items and executing them without prior recording

Post by Alvaro Tavares » Wed Sep 21, 2022 4:12 pm

I have searched the whole Ranorex site and have not found any article where It is possible for Ranorex to check all the menus and sub-menus on a web page, create a list and check all the existing links, buttons, if they are working without the need to make a recording beforehand.

Because the same web site every day is subject to change, new items may be added or some removed. Because every day doing maintenance to check if they exist and if they are working and removing or disabling , why would you fail in those steps or having to save new items takes some work and is not justified.

dhale
Posts: 84
Joined: Thu Feb 27, 2014 7:33 pm

Re: Detecting items and executing them without prior recording

Post by dhale » Fri Sep 23, 2022 6:49 pm

Sounds like you want to do a recursive ForEach over a list of elements that are found using a generic repository item path when looking for something like ATag's or ButtonTags (or whatever it is that the menu's in question are implemented as)

You may have a minor issue with the part "if they are working" - you need to define what that means to you exactly. Does it mean that a new web page appears and is able to be navigated to? That's easy enough, but really the question is probably more along the lines of "How do you know that a particular menu went to the right place" - that gets to be a bit tricky. For example suppose you have a MenuA that should go to WebPageA. How would you know that? What if a developer made a mistake and somehow MenuA (due to a bug) actually sent the user to WebPageB - and that is the tricky part you need to work on so that you detect and catch and fail the testing when appropriate.

PS none of this is going to be done via a "recording" - at minimum you'll be using UserCode within a recording to get this done. But you dont need a recording, you could just implement the logic in a UserCode module and call it directly from the rxtst