Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium/apply/helper/ApplyActionHelper.java =================================================================== diff -u -r18289 -r18644 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium/apply/helper/ApplyActionHelper.java (.../ApplyActionHelper.java) (revision 18289) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium/apply/helper/ApplyActionHelper.java (.../ApplyActionHelper.java) (revision 18644) @@ -115,14 +115,19 @@ * @param cancelBtnId 要点击终止的按钮的id */ private static void handleCancelWindow(String cancelBtnId) { + logger.info("处理终止窗口"); Utils.findByAwaitAndClick(By.id(cancelBtnId)); - Utils.doWait(300); + logger.info("点击窗口"); + Utils.doWait(5000); // 获得当前窗口 String mainWindow = Utils.driver.getWindowHandle(); // 获取所有窗口 Set handles = Utils.driver.getWindowHandles(); // 断言窗口的数量只有2,当前窗口和模态窗口 assertEquals(handles.size(), 2); + + + // 删除当前窗口 handles.remove(mainWindow); for (String windowHandle : handles) {