Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recovery Manager not handling windows pop up error message.
#1
Solved: 11 Years, 4 Months ago
Hi everyone.
I am relatively new to QTP. I am trying to resolve the pop up error message which comes when i enter login name with less than 4 characters (Sample Flight application with QTP) with Recovery Manager.
I have added 2 recovery scenarios for handling the same:
1. Clicking on the OK button of the pop up error window.
2. Next clicking on Cancel button of the Login window.

But after re-running the test, it fails with the error messages popping up again and nothing happening.

Please tell me what could be the problem?where am i going wrong?
P.S: I have linked the 2 recovery scenarios from File-Settings with appropriate priority.
Reply
#2
Solved: 11 Years, 4 Months ago
Well, I don't think this is an ideal case to use Recovery scenarios... You can simply use If-Else statement with .Exist method to check for the error pop-ups.

Note that though Recovery scenario are nice to use, they should be used judiciously as they tend to lower the speed of script execution.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 11 Years, 4 Months ago
ok..thanks ankur..
will try that..
then can u give me one scenario with the existing application where i can use Recovery scenarios..
Reply
#4
Solved: 11 Years, 4 Months ago
Please refer the post on using Recovery Scenarios in QTP
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#5
Solved: 11 Years, 4 Months ago
Instead of using QTP to deal with the pop-ups, you can use vbscript to disable the popups directly by accessing the Hkeys in the registry. Below is the code for:

'If the address(URL) in a certificate is not valid
Code:
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\"&strComputer& "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\InternetSettings"
ValueName = "WarnonBadCertRecving"
dwValue = 0
objReg.SetDWORDValue HKEY_CURRENT_USER, strkeypath, ValueName, dwValue

'Issue a warning if you are switching between secure and non-secure sites
Code:
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\"&strComputer& "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\InternetSettings"
ValueName = "WarnonZoneCrossing"
dwValue = 0
objReg.SetDWORDValue HKEY_CURRENT_USER, strkeypath, ValueName, dwValue

'Issue a warning when information is sent to another website
Code:
HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg = GetObject("winmgmts:\\"&strComputer& "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\InternetSettings"
ValueName = "WarnonPostRedirect"
dwValue = 0
objReg.SetDWORDValue HKEY_CURRENT_USER, strkeypath, ValueName, dwValue

Put the above code in a function or a library and associate the library with your tests.

The above solution proved a lot faster and reliable than Recovery Scenarios and .Exist methodologies.


Tell us all if the above worked for you. If it has, other users will be sure where to look for when they encounter this problem.
Reply
#6
Solved: 11 Years, 4 Months ago
I was realizing the same problem. Took much trial and error but I got the same scenario working as described by sanjuktab. The pop up wasn't recognized as an error. When I changed File/Settings/Recovery's "Activate recovery scenario" to "On every step". The script went through fine.

I understand RecSc can slow down the script execution but need to put this through the paces to understand how the operation works. Once I actually did it now I understand more about it's behavior. I also am looking for an "error" to capture and record a RecSc on it. I will try that tomorrow. I don't know VbScript to use the If-then-else approach in expert view.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help for instruction to click on Skip button in the warning message vijilesh 0 1,517 09-16-2018, 03:48 PM
Last Post: vijilesh
  SAP GUI gets hanged while closing the Windows Pop Up kathirvelnagaraj 0 5,535 10-23-2015, 06:47 PM
Last Post: kathirvelnagaraj
Rolleyes QTP pop up window handling piyush8793 3 16,890 10-15-2015, 11:03 PM
Last Post: Venkateswarluponna
Exclamation Login & logout in Siebel and clicking pop-up button yuetling926 7 11,366 07-09-2014, 10:43 PM
Last Post: hhamilton
  select a date from pop-up calendar Dertjon 1 5,765 05-13-2014, 02:29 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)