diff --git a/src/main/java/io/appium/java_client/AppiumDriver.java b/src/main/java/io/appium/java_client/AppiumDriver.java index 02b902bc7..7790e3299 100644 --- a/src/main/java/io/appium/java_client/AppiumDriver.java +++ b/src/main/java/io/appium/java_client/AppiumDriver.java @@ -68,6 +68,7 @@ public AppiumDriver(URL remoteAddress, Capabilities desiredCapabilities){ .put(LOCK, postC("/session/:sessionId/appium/device/lock")) .put(SHAKE, postC("/session/:sessionId/appium/device/shake")) .put(COMPLEX_FIND, postC("/session/:sessionId/appium/app/complex_find")) + .put(OPEN_NOTIFICATIONS, postC("/session/:sessionId/appium/device/open_notifications")) ; ImmutableMap mobileCommands = builder.build(); @@ -217,6 +218,11 @@ public void runAppInBackground(int seconds) { execute(RUN_APP_IN_BACKGROUND, ImmutableMap.of("seconds", seconds)); } + /** + * Open the notification shade, on Android devices. + * Android only method. + */ + public void openNotifications() { execute(OPEN_NOTIFICATIONS); } /** * Performs a chain of touch actions, which together can be considered an entire gesture. * See the Webriver 3 spec https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html diff --git a/src/main/java/io/appium/java_client/MobileCommand.java b/src/main/java/io/appium/java_client/MobileCommand.java index 1fee813e7..07d55d0bd 100644 --- a/src/main/java/io/appium/java_client/MobileCommand.java +++ b/src/main/java/io/appium/java_client/MobileCommand.java @@ -45,6 +45,7 @@ public interface MobileCommand { String LOCK = "lock"; String SHAKE = "shake"; String COMPLEX_FIND = "complexFind"; + String OPEN_NOTIFICATIONS = "openNotifications"; }