Skip to main content

StartMonitor

Description

Erase monitoring information collected so far and start monitoring a given application on a regular basis.

Parameters

NameValue
PackageNameName of application to be monitored or an empty string if you just want to erase monitoring information.

Usage

This erases the monitoring information collected so far and starts monitoring the given application name.

If no application name will be given, only the monitoring information is erased.

info
  • Android 6.0+ and all iOS versions are supported.
  • Monitoring must be started after the application was launched.
  • If an application is closed, energy monitoring must be started again by executing startMonitor.
info

Replace <server> with the appropriate URL.

Example

StartMonitor

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);
seetest.getMonitorsData("C:\\experitest\\monitor.csv");

info

To export the collected data in CSV format, use getMonitorsData.