Example 1: “Demo Template”


This is an example how I use the Rumba addon. In real, I use this code in 4 files, one to open Rumba, one to go to specific mainframe application, one to leave a mainframe application and one to close Rumba. In this case, they are all combined:


'Open Rumba session, if not already open

WDOpenRumba("C:\Users\XXX\Desktop\QTP TE.WDM")


'Before beginning, set the system path if required

'SystemPath = "C:\Program Files (x86)\WallData\SYSTEM"


'Wait a short while for the program to start and settle

WDWait(1000)


'Open connection with the first opened session.

'It is not recommended to open multiple sessions

WDOpen()


'For this application, the use of sendkeys worked the best.

'But normally SetText would be used.


'First sendkeys to go to the signon screen

WDSendKey("msm@E")


'Wait for the cursor is set to the user-id field

WDWaitWhile(WDGetPos(18, 26))


'Now fill in the UserID and PSW

WDSendKey("LOGINNAME@E")

WDWaitWhile(WDGetPos(19, 26))

WDSendKey("PSW@E")


'Wait till subsystem selection screen is appeared

'and then select option 2

WDWaitWhile(WDGetPos(1, 28), "Subsystem Selection")

WDSendKey("2@E")


'Wait till Production Activity Account screen is active

WDWaitWhile(WDGetPos(1, 26), "Production Activity Account")


'For fun, place the screen text to output

output = WDGetText()


'For fun, search text on screen

Status = WDSearch("Production")


'Exit by pressing F3

WDSendKey("@3")


'Wait till subsystem selection screen is appeared and then select F3 again

WDWaitWhile(WDGetPos(1, 28), "Subsystem Selection")

WDSendKey("@3")


'Wait a short while for the program to end Rumba and settle

WDWait (1000)


'Close connection with session

WDClose()


'Close Rumba

WDCloseRumba("C:\Users\XXX\Desktop\QTP TE.WDM")



Created with the Personal Edition of HelpNDoc: Easily create PDF Help documents