02-04-2009, 08:23 PM
Hi,
I have a scenario, wherein my QTP script which runs on windows OS, handles same application on two different OS (windows and Nonstop). On windows it is directly handled by window class and on nonstop an emulator called OutsideView is used.
When I record the same set of instructions on these two OS, windows and Nonstop the code is as below.
For Windows:
For Nonstop:
In the above two scenarios,the application on WINDOWS os is recognised as ANSIWINDclass and on Nonstop OS it is recognised as Outsideview Class.
My query is that, is there a way in QTP, that a single line of common code can handle the operation (ex. clicking F5 Function Key) on both the OS.
I have a scenario, wherein my QTP script which runs on windows OS, handles same application on two different OS (windows and Nonstop). On windows it is directly handled by window class and on nonstop an emulator called OutsideView is used.
When I record the same set of instructions on these two OS, windows and Nonstop the code is as below.
For Windows:
Code:
Window("Application Execution").Activate
Window("Application Execution").Type micF5
Window("Application Execution").Activate
Window("Application Execution").Type micF8
Window("Application Execution").Activate
Window("Application Execution").Type micF9
Window("Application Execution").Activate
Window("Application Execution").Type micF10
Window("Application Execution").Activate
Window("Application Execution").Type micF11
Window("Application Execution").Activate
Window("Application Execution").Type micF3
For Nonstop:
Code:
Window("OutsideView").Window("Tandem 5*").Activate
Window("OutsideView").WinObject("FKey").Click 112,15
Window("OutsideView").WinObject("FKey").Click 183,13
Window("OutsideView").WinObject("FKey").Click 204,13
Window("OutsideView").WinObject("FKey").Click 228,16
Window("OutsideView").WinObject("FKey").Click 256,16
Window("OutsideView").WinObject("FKey").Click 75,17
Window("OutsideView").Window("Tandem 5*").Activate
Window("OutsideView").WinObject("FKey").Click 69,12
In the above two scenarios,the application on WINDOWS os is recognised as ANSIWINDclass and on Nonstop OS it is recognised as Outsideview Class.
My query is that, is there a way in QTP, that a single line of common code can handle the operation (ex. clicking F5 Function Key) on both the OS.