IBM Support

SQABasic StartTimer and StopTimer missing in stand-alone log

Troubleshooting


Problem

When you use the StartTimer StopTimer function in an IBM Rational Robot script in standalone mode, the log does not display the start time and stop time.

Symptom

You run the following or similar SQABasic code.

Disclaimer

All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.




Window SetContext, "WindowTag=WEBBrowser", ""



StartTimer "Step-1 HomePage"
HTMLLink Click, "HTMLText=" & URL, ""
Browser NewPage,"",""
StopTimer "Step-1 HomePage"

Cause

In standalone mode StartTimer and StopTimer does not work.

Resolving The Problem

WORKAROUND:

Use the Timer function. The following code sample renders the time between start and stop in the log, when you use the Timer function.


Window SetContext, "WindowTag=WEBBrowser", ""


T0 = Timer()
HTMLLink Click, "HTMLText=" & URL, ""
Browser NewPage,"",""
T1 = Timer()

SQALogMessage sqaNone, Cstr(T1-T0), "Time the page opens in sec"


Alternatively you can use the InternetExplorer object to open the URL.



Set ie = CreateObject("InternetExplorer.Application")
...
T0 = Timer()
ie.Navigate URL
T1 = Timer

SQALogMessage sqaNone, Cstr(T1-T0), "Time the page opens in sec"



Note:
The Timer function measures the time elapsed since midnight. Therefore, you get unexpected results when the code starts before midnight and completes after midnight. Also the StartTimer StopTimer function has this limitation.

[{"Product":{"code":"SSSHDX","label":"Rational Robot"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Scripting","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0.3;7.0.3.1;7.0.3.2;7.0.3.3;7.0.3.4;7.0.3.5;7.0.3.6;7.0.3.7;7.0.3.8;7.0.3.9","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21639075