Micro Focus QTP (UFT) Forums
Action results seen in next action - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Action results seen in next action (/Thread-Action-results-seen-in-next-action)



Action results seen in next action - XeNoMoRpH - 06-18-2009

I have a test that has several actions. Every action submits a form and loads a new page. My issue is that the result of the submitted form can only be seen in the next action via the active screen in the test results. I tried adding the Sync() method to it, but that did nothing. I'd like to stay away from the Wait() method if possible just because I feel like there should be a way to tell if the browser is done loading a page or not.

Has anyone ever ran into this problem and have a solution?


RE: Action results seen in next action - Jackomcnabb - 06-18-2009

you can always try to lopp until an object you expect exists:
Code:
For i = 1 to 10000
    If  SwfWindow("WindowOne").SwfWindow("Create Customer / Class").exist(0) Then
        Exit for
    End If
Next



RE: Action results seen in next action - XeNoMoRpH - 06-19-2009

The issue I'm having really isn't related to the object being there. My issue is that after I submit the form the only way to get a screenshot of the results is by going to the next action. I was going to create a VirtualButton, but it failed even though I have administrative privileges. So, I'll probably just add a dummy step where it inserts something in to an input.

Also, I think a better way to do the above would be

Code:
Do While SwfWindow("WindowOne").SwfWindow("Create Customer / Class").exist(0) <> True
   Wait(1)
Loop
Or something like that...