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

Last updated: May 30, 2019 13:21

Perfecto Command

mobile:timer:info

Purpose

Retrieves timer value.

There is no need to stop the timer to use the Get timer function

Note: Get timer 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)

Parameters

NameTypePossible ValuesDescription
timerIdStringscript | TimerA | TimerB | TimerC | other_name

Mandatory.

Unique timer identifier, that was used to start the timer.
Enter a timer identifier that was used in the Timer start function, or select 'Script' to get the time passed from the beginning of the script.

timerTypeStringelapsed | device |
ux | system 

Mandatory.

The selected timer type.
Elapsed - Elapsed time (no segmentation)
Device - Device work time
UX - User experience time
System - System activity

unitsStringseconds | millisecondsThe time units.
Seconds (default)
Milliseconds

Return Value

timer value

Exceptions

None

Examples

Java sample
Map<String, Object> params = new HashMap<>();
params.put("timerId", "myTime");
params.put("timerType", "elapsed");
int timeEx = (int)driver.executeScript("mobile:timer:info", params); 
C# sample
Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("timerId", "script");
pars.Add("timerType", "system");
int timeSys = (int)driver.ExecuteScript("mobile:timer:info", pars);