Skip to content

Commit 39be0dd

Browse files
committed
added openNotifications command, fixes #42
1 parent 71212db commit 39be0dd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/main/java/io/appium/java_client/AppiumDriver.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public AppiumDriver(URL remoteAddress, Capabilities desiredCapabilities){
6868
.put(LOCK, postC("/session/:sessionId/appium/device/lock"))
6969
.put(SHAKE, postC("/session/:sessionId/appium/device/shake"))
7070
.put(COMPLEX_FIND, postC("/session/:sessionId/appium/app/complex_find"))
71+
.put(OPEN_NOTIFICATIONS, postC("/session/:sessionId/appium/device/open_notifications"))
7172
;
7273
ImmutableMap<String, CommandInfo> mobileCommands = builder.build();
7374

@@ -217,6 +218,11 @@ public void runAppInBackground(int seconds) {
217218
execute(RUN_APP_IN_BACKGROUND, ImmutableMap.of("seconds", seconds));
218219
}
219220

221+
/**
222+
* Open the notification shade, on Android devices.
223+
* Android only method.
224+
*/
225+
public void openNotifications() { execute(OPEN_NOTIFICATIONS); }
220226
/**
221227
* Performs a chain of touch actions, which together can be considered an entire gesture.
222228
* See the Webriver 3 spec https://dvcs.w3.org/hg/webdriver/raw-file/default/webdriver-spec.html

src/main/java/io/appium/java_client/MobileCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public interface MobileCommand {
4545
String LOCK = "lock";
4646
String SHAKE = "shake";
4747
String COMPLEX_FIND = "complexFind";
48+
String OPEN_NOTIFICATIONS = "openNotifications";
4849

4950

5051
}

0 commit comments

Comments
 (0)