How to Listing Windows?

Class library usage, coding and language questions.
Posts: 2
Joined: Thu Apr 11, 2019 4:27 pm

How to Listing Windows?

Post by mocmeo1998 » Sat Apr 20, 2019 4:08 am

Is there a way to list the windows open on the desktop using Ranorex? For our software automation testing, each window is identified uniquely by a label in the status bar, and I will need to flip through all of the open windows until the correct screen is found.

We're coding against the Ranorix .Net library, but could look at a DLL Import call to the Core if it would be possible using that method.

Thanks for any help and for the great library!

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

Re: How to Listing Windows?

Post by odklizec » Mon Apr 22, 2019 6:07 pm


Unfortunately, without seeing your app under test, or, at very least, its snapshot (NOT screenshot), it’s impossible to suggest something reliable. I’m not even sure, if you want to go through windows generated be your app, or multiple (randomly opened) apps and simply search for the window of your own app? Additionally, from your description it seems, as if you are not using Ranorex Studio, just Ranorex libs? In this case, you are not able to use Ranorex repository, which means you will have to find elements via xpaths and Find method (and its variants). See Ranorex API, available here...
As mentioned, there is not enough info to provide more reasonable answer. So please post a Ranorex snapshot (not screenshot), pointing to your app and its windows. Thanks.
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