How to detect when a window is closed in QTP?

  • Questions
  • How to detect when a window is closed in QTP?
Question ID: 104697
1
0

I have a window that pops up and I need to wait for it to disappear before going forward with testing. Does anybody have good idea?

Marked as spam
Posted by (Questions: 17, Answers: 5)
Asked on November 13, 2012 2:42 pm
8 views
Answers (1)
8
Private answer

Have you tried the exist statement with a wait? Once the window disappears you will have to wait the default time(normally 20 seconds) for QTP determine the object does not exist.


myBln=true
While myBln=True
  myBln = Window(''Test'').Exist
  Wait 2
Wend
Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on November 13, 2012 2:47 pm
that works great.
( at November 13, 2012 2:48 pm)