Skip to main content

GetCounter

Description

 Returns the monitor (CPU/Memory/Battery) value on the given time

Parameters

NameValueDescription
CounterNameString* CPU

* Memory

* Battery(only when a Instrumented application is running in the foreground)
PackageNameStringOptional parameter. When given, monitor value will be returned for the application whose package name is given, otherwise the monitor value will be returned for the system level.

Usage

info

Replace <server> with the appropriate URL.

Example

GetCounter

DesiredCapabilities dc = new DesiredCapabilities();
driver = new AndroidDriver(new URL("<server>"), dc);
seetest = new SeeTestClient(driver);
dc.setCapability(MobileCapabilityType.UDID, "deviceid");

...
...

// Start Monitor and erases and previous monitor data and store current monitor in a given file.
seetest.startMonitor("com.experitest.ExperiBank");
seetest.setMonitorPollingInterval(1000);
seetest.sleep(5000);
// get Count for cpu
client.GetCounter("cpu");

Values will be retuned in the report