Why is the recovery scenario (recovery scenario) not triggered in qtp?

Source: Internet
Author: User

In this article, Tarun Lalwani summarizes the situations in which five qtp restoration scenarios will not be triggered:
Why is my recovery scenario not getting fired?
Http://knowledgeinbox.com/articles/qtp/recovery-scenario/why-is-my-recovery-scenario-not-getting-fired/

Debugging recovery scenario (RS) is always been a tough ask. But knowing situations where Rs won't work before hand can be of added

Advantage. In this article we will have e varous possible scenarios where RS is not fired. We will assume the RS to be fired is "any error"

 

Situation #1-The script errors script will not be triggered if the test object is not involved!

Errors not involving any test object won't fire any recovery scenario. All the code lines listed below will raise an error but not a Rs

X = 2/0
Y = left ("test",-2)

 

Situation #2-object not in Object repository (OR) object is not in or. This error will not trigger Rs execution!

If you try to access a object from the OR and it does not exist in the or at all, then qtp will throw an error and RS won't be fired. Object not

Found in Object repository error is treated as a script error by qtp and is raised directly.

 

The situation #3-Modal Dialog blocking mode dialog box blocks execution and does not trigger Rs execution!

In case the operation you have saved med causes a modal dialog to appear, RS can't get fired in such situations. The simplest example of this

The code shown below

Msgbox "you can't fire a recovery scenario now"

The call to the msgbox blocks execution in current thread and qtp get busy waiting for someone to close the message box. In such situations

No RS can get executed

 

Situation #4-associated library is not found cannot find the associated function library. This error will not trigger Rs execution!

In case the RS action is to call a function from a library file and library file is not found, the RS will not get triggered.

Situation #5-activate recovery Scenario setting is not configured properly if active recovery scenario is set to "never", RS will not be triggered

Go to file-> Settings... -> Recovery (Tab)-> activate recovery scenario option. If the value is set to 'never 'No RS can get fired, In case value is

Set to 'on error' then the recovery scenario will only be fired when an error occurs. In case the scenario is not fired change this setting to 'on

Every step'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.