Validate a UUT has closed

Best practices, code snippets for common functionality, examples, and guidelines.
ianr
Posts: 3
Joined: Thu Aug 29, 2019 11:36 am

Validate a UUT has closed

Post by ianr » Thu Aug 29, 2019 11:57 am

I'n new here so please be gentle :)

So, I have been validating my simple Qt Installer... Okay so far.
I press the Quit control, and the App disappears...

?? How can I validate that the App has closed ??

Thanks for any answers

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

Re: Validate a UUT has closed

Post by Stub » Thu Aug 29, 2019 1:37 pm

I use a Repository item to represent the top level of our application. I then have a code module in which I wait for that Repository item to not exist, using the WaitForNotExists() API.

So I do the thing that closes our application, then wait until the thing that represents our application no longer exists. Boom, application has closed, I can then continue as required.

ianr
Posts: 3
Joined: Thu Aug 29, 2019 11:36 am

Re: Validate a UUT has closed

Post by ianr » Thu Aug 29, 2019 10:37 pm

Hi Thanks for that

Have you got any c# code examples you would be willing to share to help me out...
I'm a manual tester being thrown into automation with very little programming experience :?

Thanks
IAN

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

Re: Validate a UUT has closed

Post by Stub » Fri Aug 30, 2019 8:05 am

It's essentially just finding your application representation in the repository, and calling WaitForNotExists() on it:

Code: Select all

Repo.MyApplication.SelfInfo.WaitForNotExists(Repo.MyApplication.SearchTimeout);