QTP Recovery Scenario Specification

When we run script under our new framework, we found that will missing the “FrameworkErrorHandler.vbs” in Recovery Scenario.

Issue:
For the better transplantation, we use the relevant path for all items in new framework, but once we generate the QRS file, the relevant path will change to absolute path, and we can’t modify this path any more.

Solution:
Now that this file is change to absolute path, and need to in keeping with relevant path in framework, I thought a way to specify a path, and generate the “FrameworkErrorHandler.vbs” dynamically:

Before we run the test cases, copy the “FrameworkErrorHandler.vbs” in framework to root directory of C disk.

1
2
3
Set fso = CreateObject( "Scripting.FileSystemObject" )
fso.CopyFile oParentFolder + "FrameworkErrorHandler.vbs", "c:\FrameworkErrorHandler.vbs"
fso.GetFile("c:\FrameworkErrorHandler.vbs").Attributes = 0 'set file attribute to nomal

No matter you put the framework in anywhere of your PC, QRS file can find and read the custom recovery scenario function file successfully.

唐胡璐 wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!
分享创造价值,您的支持将鼓励我继续前行!