Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
One common code line in QTP to handle two different widows in QTP
#1
Not Solved
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:

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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP resets values of certain fields, while running (Code attached) niveditachan 1 3,118 02-04-2015, 03:55 PM
Last Post: anshika.agarwal
  UFT 12 hangs on a line (.NET forms) sara- 0 2,523 10-22-2014, 03:51 PM
Last Post: sara-
  Any alternative of QC to handle Automation Scripts viks 0 1,829 04-30-2014, 10:59 AM
Last Post: viks
  PDF to text converter needed. (command line version freeware) priyaang 2 2,826 03-27-2014, 03:48 PM
Last Post: priyaang
  capture screenshot using html code and view in QTP Test results Bhuvan 3 7,207 07-19-2013, 02:38 PM
Last Post: Bhuvan

Forum Jump:


Users browsing this thread: 1 Guest(s)