我正在测试一个应用程序,该应用程序必须关闭针对错误电子邮件格式显示的警报。该案例第一次失败,如果我手动解雇,则所有其他无效案例的其他测试用例都将弹出,并弹出解雇作品。
我正在使用
public void dismissAlert() {
WebDriverWait wait = new WebDriverWait(appDriver, 1000);
wait.until(ExpectedConditions.alertIsPresent());
appDriver.switchTo().alert().dismiss();
}
appDriver在哪里
protected static AppiumDriver appDriver;
代码(case)正确执行到这一点,然后引发错误:
[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依赖项
<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>