I am testing an application where I have to dismiss the alert shown for the wrong email format. The case is failing for the first time and if I manually dismiss, the other test cases for all other Invalid cases and pop up dismiss works.

I am using

public void dismissAlert() {
    WebDriverWait wait = new WebDriverWait(appDriver, 1000);
    wait.until(ExpectedConditions.alertIsPresent());
    appDriver.switchTo().alert().dismiss();

}

Where appDriver is

protected static AppiumDriver appDriver;

The code ( cases ) execute to this point correctly and then the error is thrown:

   [31morg.openqa.selenium.WebDriverException: java.io.IOException: unexpected end of stream on Connection{0.0.0.0:4723, proxy=DIRECT hostAddress=/0.0.0.0:4723 cipherSuite=none protocol=http/1.1}
  Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'

Maven Dependencies

<dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>6.0.0</version>
    </dependency>
<dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.13.0</version>
</dependency>
<dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
</dependency>

0 Answers