Micro Focus QTP (UFT) Forums
How to execute Chunk of my test script on new window using SystemUtil.Run function - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to execute Chunk of my test script on new window using SystemUtil.Run function (/Thread-How-to-execute-Chunk-of-my-test-script-on-new-window-using-SystemUtil-Run-function)



How to execute Chunk of my test script on new window using SystemUtil.Run function - umer830 - 12-29-2009

I have a QTP test script to do some operations on my web application. Now here is my business scenario

1-Login in application with User A ( User name becomes part of browser title window)
2-User A do some tasks and allocate others to user B
3-User B should login and check what tasks are allocated to me.
///////////////////////
4-now to accomplish above task i am using SystemUtil.Run, APPURL
method to open my required application
5- QTP opens application login into application ( Becuase login function
have test object descriptions different than base browser which user A used.
6- Next step is User B to open allocated ( Using same reusable function user A used to open allocated task window ) task window, where the problem is that rather than working on new window it goes back to base window i.e. User A window.

Do I need to record this reuable function again for user B. so it dont go on base user A window

I wantQTP to work on newly opened application

If it is difficult to extract the problem please see attached screenshort


Regards,
Umer


RE: How to execute Chunk of my test script on new window using SystemUtil.Run function - umer830 - 12-30-2009

I am still facing this issue. Is it mean that opeing two browser windows during run session in parallel not a good approach. Perhaps QTP gets confused if AUT is opened in two browsers.

In my above case all I can do is logout USER A first and login with USER B. Once second user is done with its tasks all it can do is logout and initial user i.e. user A can re-login

Taking assumptions waiting for your response


RE: How to execute Chunk of my test script on new window using SystemUtil.Run function - Saket - 12-30-2009

it is possible to handle two browsers with QTP. QTP differentiate between the two with 'Creation time'

you can use the same reusable again taking care of creation time.


RE: How to execute Chunk of my test script on new window using SystemUtil.Run function - umer830 - 01-14-2010

Saket I am unable to get how to pic creation time. Because the base window is the one QTP using to run first 10 scripts. The next login widow is the one created by SystemUtil.Run, APPURL
but QTP stuck on login page the moment i close the base window it starts login operation on the newly created window. Its really frustrating. I am searching for some Handle to window wor something else as QTP itself not seem picking it up