Skip to main content

GetCurrentActivity

Description

Use this command to retrieve the foreground activity name.

info

Only Android devices are supported.

Usage

info

Replace <server> with the appropriate URL.

GetCurrentActivity

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

...
...

//Get the current foreground activity
seetest.getCurrentActivity();