Micro Focus QTP (UFT) Forums
Recovery scenarion issue - 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: Recovery scenarion issue (/Thread-Recovery-scenarion-issue)



Recovery scenarion issue - 1981.madhu@gmail.com - 12-30-2009

Hi ,
I want to handle security alert in gmail.As per your article i did the following way ,but it wont working ,can u hav a look and suggest


1.This is my qtp script


Code:
SystemUtil.Run "iexplore.exe","http://www.gmail.com","",open

Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "madhu"


In OR ,I added all objects (gmail browser+security alert dilaog objects)


2.This one is my Function ibrary

Code:
Function Recovery_Found(Object)
win_handle=Browser("Gmail: Email from Google").Dialog("Security Alert").GetROProperty("hwnd")

Set pop_win=Window("hwnd:=" & win_handle)



pop_win.WinButton("text:=OK").Click
End Function

Its saved in the local
.
From Recovery manger ,i did the all steps

Go to Resources->Recovery Scenario Manager...
Recovery Scenario Manager window opens
Click on "New Scenario" icon to open Recovery Scenario Wizard.
Click Next.
From Select Trigger Event, choose Pop-up window. Click Next.
Now when the "Specify Pop-up Window Conditions" area is open, make sure the pop-up window is also open simultaneously with this
"Specify Pop-up Window Conditions" window, so that you can click on the hand icon and then click on pop-up window so as to fill the "Window title" and "Window text contains" fields. Click Next.
Recovery Operations area opens, Click Next.
Choose Recovery Operation as Function Call, click Next.
On the next screen, click on button on the right of "Function Library" dropdown to select the function library we created earlier in local.
Click Next
In the Recovery Operation window uncheck "Add another recovery operation". Click Next.
In the Post-Recovery Test Run Options choose "Stop the test run" radio button. Click Next.
Give the Recovery Scenario a Name and Description and click Next
In the Completing the Recovery Scenario Wizard area check "Add scenario to current test" and click Finish.
In the Recovery Scenario Manager window you will see one scenario added in the scenarios area.
Click Close and save the Recovery Scenario.


Regards

Madhu