Index: ssts-web/src/test/java/test/forgon/disinfectsystem/selenium/Regular_Monitor.java =================================================================== diff -u -r26347 -r26818 --- ssts-web/src/test/java/test/forgon/disinfectsystem/selenium/Regular_Monitor.java (.../Regular_Monitor.java) (revision 26347) +++ ssts-web/src/test/java/test/forgon/disinfectsystem/selenium/Regular_Monitor.java (.../Regular_Monitor.java) (revision 26818) @@ -1,5 +1,7 @@ package test.forgon.disinfectsystem.selenium; +import static org.junit.Assert.assertNotNull; + import java.io.IOException; import org.testng.annotations.AfterMethod; @@ -8,11 +10,7 @@ import org.testng.AssertJUnit; import org.openqa.selenium.By; import org.openqa.selenium.Keys; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.Wait; - -import test.forgon.disinfectsystem.selenium.factory.WaitFactory; +import org.openqa.selenium.WebElement; import test.forgon.disinfectsystem.selenium.tools.JSWaiter; import test.forgon.disinfectsystem.selenium.tools.Utils; @@ -88,9 +86,10 @@ Utils.driver.switchTo().window(currentwindowhandle); if (Utils.isFind(Utils.retryingFind(By.id("qualityMonitoringWin")))) { Utils.retryingFindAndClick(By.id("qualityMonitoringWin")); - Wait wait = WaitFactory.createDefaultWait(); - wait.until(ExpectedConditions.attributeToBeNotEmpty( - Utils.driver.findElement(By.id("formName2")), "value")); + JSWaiter.waitUntilJQueryReady(); + WebElement formName2 = Utils.retryingFind(By.id("formName2")); + String value = formName2.getAttribute("value"); + assertNotNull("监测项不能为空!", value); Utils.retryingFindAndClick(By.id("material2")); Utils.retryingFindAndSendKeys(By.id("material2"), Keys.DOWN); JSWaiter.waitUntilJQueryReady();