Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Jun 05, 2019 10:54

Perfecto Command

mobile:timer:start

NoteTimer Start command is only supported when using Perfecto's Native IDE automation testing. To use timers in Automation testing with Appium/Selenium please see this article: Use Timers in Automation Testing (Appium/Selenium)


Purpose

Begins to measure time, with the specified timer ID, until the Timer stop function is invoked.

The Timer Initialization parameter is useful when using within a loop, where the timer can be reset or continued with each iteration.

Parameters

NameTypePossible ValuesDescription
timerIdStringTimerA | TimerB |
TimerC | other_name

Mandatory.

Unique timer identifier.
Enter an identifier or use one of the listed identifiers.

initPolicyStringreset | noreset The timer initialization.
Reset (default) - Reset timer to zero
No reset - Continue timer from the existing value

Return Value

None

Exceptions

None

Examples

Java sample
Map<String, Object> params = new HashMap<>();
params.put("timerId", "myTime");
driver.executeScript("mobile:timer:start", params); 
C# sample
Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("timerId", "TimerB");
driver.ExecuteScript("mobile:timer:start", pars);