RISHI KHANNA
RISHI KHANNA

Reputation: 374

Automating PUSH notification

Is it possible to automate push notifications in Android emulator using Appium? How can we slide down the notification handle and select appropriate application notification?

Upvotes: 1

Views: 3764

Answers (1)

Darshan Ambhaikar
Darshan Ambhaikar

Reputation: 785

Yes you can Open Notifications using

driver.openNotifications();

You can Scroll down to your Notification

WebElement element = driver.findElement(By.name("Element Name"));
HashMap<String, String> arguments = new HashMap<String, String>();
arguments.put("element", element.getId());
(JavascriptExecutor)driver.executeScript("mobile: scrollTo", arguments);

Upvotes: 4

Related Questions