Hi,
I am trying to open notification tray in a Android device, I am using the following code to achieve it:
driver.openNotifications();
But is there any way to just see the notification tray without launching the App. If yes, what should be selected in the Appium application setting.
Below is the code used to achieve it.
private static AndroidDriver driver;
public static void main(String[] args) throws MalformedURLException, InterruptedException {
// Create object of DesiredCapabilities class
DesiredCapabilities capabilities = new DesiredCapabilities();
// Optional
// capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("deviceName", "My New Phone");
capabilities.setCapability("platformVersion", "5.1");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("appPackage", "com.pushio.testharness3");
capabilities.setCapability("appActivity", "com.pushio.testharness1.MainActivity");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
driver.openNotifications();
Thread.sleep(10000);
driver.quit();
}