【发布时间】:2011-09-29 17:04:21
【问题描述】:
我正在将我的编码转换为 Junit4(webdriver) 。当我在 Eclipse 中运行我的代码时,下面的代码中出现错误,
for (int second = 0;; second++) {
if (second >= 60) fail("timeout");
try {
if (isElementPresent(By.cssSelector("button.MB_focusable"))) break;
}
catch (Exception e) {}
Thread.sleep(1000);
}
谁能告诉我如何摆脱这个?
【问题讨论】:
-
什么样的错误?编译错误?您是否只是超时失败?
-
Thread.sleep(1000) 行应该有错误为:Unhandled exception type InterruptedException
标签: java selenium junit4 selenium-ide