how to check whether launched windows exists or not in c#

Experiences, small talk, and other automation gossip.
learnq
Posts: 1
Joined: Sat May 26, 2018 4:22 pm

how to check whether launched windows exists or not in c#

Post by learnq » Sat May 26, 2018 4:36 pm

I am very very new to this..

I have launched the window application using runapplication command

But after that how i can ensure whether that app is launched or not in C# code?

Please help..

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

Re: how to check whether launched windows exists or not in c#

Post by odklizec » Mon May 28, 2018 8:21 am

Hi,

The easiest way to check if the application is running is to check the presence of main dialog window (its title or any element inside the app window). I would personally use Validate Exists action. My I ask why you must do such validation in code? You can simply record Validate Exists action and if really needed, convert it to code. But honestly, since you mentioned you are new to Ranorex, you should stick with Record and available pre-defined actions. Only after you gain some skills, you can start to explore code.
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