Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Luk Contributor.
Contributor.
254 views

[UFT 12.54] Runtime Delay Setting

Hi,

Is there a way to set the step execution delay in the script? I have just one script which I want to run slower and it is problematic, to change the settings evertime i run this particular script and revert the dealay to 0 for all other scripts. 

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: [UFT 12.54] Runtime Delay Setting

Hi

There is a setting in UFT to delay the execution.

Open a test and go to Tools>Options>Gui Testing>Test Runs

You will see the Run mode part, if it's set to normal you can put in miliseconds the amount oftime you want to delay every step

Screenshot_2.png

 

 

Let me know if this information is useful for you and if you think that solves your problem feel free to mark it as a solution.

Best Regards,

-Joaquin Viquez

0 Likes
Luk Contributor.
Contributor.

Re: [UFT 12.54] Runtime Delay Setting

Hi,

I know this option, but I would like to change this setting from the script. Is there a way to do this?

0 Likes
Knowledge Partner
Knowledge Partner

Re: [UFT 12.54] Runtime Delay Setting

You can do that from the AOM if you run the script from there

Dim requiredRunMode = "Normal"   

 Dim qtApp 'As QuickTest.Application ' Declare the Application object variable

    Dim qtTest 'As QuickTest.Test ' Declare a Test object variable

    Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object

    qtApp.Launch ' Start QuickTest

    qtApp.Visible = True ' Make the QuickTest application visible

    ' Set QuickTest run options

    qtApp.Options.Run.CaptureForTestResults = "OnError"  'Capture lines on Error for test result

    qtApp.Options.Run.RunMode = requiredRunMode ' Set the run mode.

    qtApp.Options.Run.ViewResults = False   'disable the auto launch test result at the end of the execution.

    qtApp.Open "C:\Temp\GUITest1", True ' Open the test in read-only mode

    qtApp.Test.Run   'Run test

    Set qtResultsOpt = Nothing ' Release the Run Results Options object

    Set qtTest = Nothing ' Release the Test object

    Set qtApp = Nothing ' Release the Application object

Mark Smith.

0 Likes
RajkumarR Outstanding Contributor.
Outstanding Contributor.

Re: [UFT 12.54] Runtime Delay Setting


@Luk wrote:

Hi,

Is there a way to set the step execution delay in the script? I have just one script which I want to run slower and it is problematic, to change the settings evertime i run this particular script and revert the dealay to 0 for all other scripts. 


Hi Luk,

Instead of delaying step execution , you could increase the Default Timeout and achieve the same result. Increase the timeout at the start of that specific test and reset it to default at the end.

But make sure that you reset at the Clean up/Tear Down section so that you won't set a long timeout for the other tests, in case this test exits prematurely.

Here's the snippet.

Setting("DefaultTimeout") = 60000

'Your Script

Setting("DefaultTimeout") = 20000

_____________________
Rajkumar Rajangam
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.