Open notifications (FR)

Perfecto Command

mobile:notifications:open

Purpose

Opens the notifications shade. This is helpful when testing for scenarios that use notifications from internal and external apps. How does your app behave when a weather notification comes in?

Restriction: This command is only supported for Android.

Parameters

None

Return Value

None

Exceptions

None

Examples

Copy

Java sample

//declare the Map for script parameters
Map<String, Object> params = new HashMap<>();
 
driver.executeScript("mobile:notifications:open", params);
Copy

C#

//declare the Map for script parameters
Dictionary<String, Object> pars = new Dictionary<String, Object>();
 
driver.ExecuteScript("mobile:notifications:open", pars);