Skip to content

Commit

Permalink
added openNotifications command, fixes #42
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonahss committed Jun 16, 2014
1 parent 71212db commit 39be0dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/io/appium/java_client/AppiumDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, CommandInfo> mobileCommands = builder.build();

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/main/java/io/appium/java_client/MobileCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public interface MobileCommand {
String LOCK = "lock";
String SHAKE = "shake";
String COMPLEX_FIND = "complexFind";
String OPEN_NOTIFICATIONS = "openNotifications";


}

0 comments on commit 39be0dd

Please sign in to comment.