Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium/tools/Utils.java =================================================================== diff -u -r19263 -r19283 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium/tools/Utils.java (.../Utils.java) (revision 19263) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium/tools/Utils.java (.../Utils.java) (revision 19283) @@ -996,7 +996,6 @@ */ public static boolean isWindowAmountEquals(int expectedNumberOfWindows, int timeOut) { - JSWaiter.waitUntilJQueryReady(); int initCount = driver.getWindowHandles().size(); int actualSize = initCount; if (initCount == expectedNumberOfWindows) { @@ -1103,17 +1102,17 @@ // 回收窗口 String mainWindow = Utils.driver.getWindowHandle(); - // 通过API方式点击自定义入筐的div按钮(适用于Win7 IE11环境) - Utils.retryingFindAndClickBySeleniumAPI(By.id("customIntoBasketDiv")); + // 通过JS方式点击自定义入筐的div按钮(适用于Win7 IE11环境) + Utils.retryingFindAndClickByJavaScript(By.id("customIntoBasketDiv")); boolean isNewWindowOpened = Utils.isWindowAmountEquals(2, 8000); - // 尝试用JS的方式点击自定义入筐按钮 + // 尝试用API的方式点击自定义入筐按钮 if (!isNewWindowOpened){ - logger.info("通过API点击,没有打开自定义入筐的窗口,尝试用JS调用方式打开..."); - Utils.retryingFindAndClickByJavaScript(By.id("customIntoBasketDiv")); + logger.info("通过JS点击,没有打开自定义入筐的窗口,尝试用API调用方式打开..."); + Utils.retryingFindAndClickBySeleniumAPI(By.id("customIntoBasketDiv")); isNewWindowOpened = Utils.isWindowAmountEquals(2, 8000); } else{ - logger.info("通过API点击,打开了自定义入筐的窗口"); + logger.info("通过JS点击,打开了自定义入筐的窗口"); } if (isNewWindowOpened){