硒2错误与Firefox 11.0
问题描述:
我新与硒2,我尝试运行一个简单的(波纹管)例外,但是当我使用firefoxe 11.0我有一个窗口信息:[应用程序JavaScript] TypeError:Componenets;类[西德]未定义硒2错误与Firefox 11.0
,我有义务单击确定按钮来查看我的脚本执行
我怎么能定势呢?
public class WhenSearchingForDrupalUsingGoogleTest {
private String baseUrl;
private WebDriver driver;
private ScreenshotHelper screenshotHelper;
@Before
public void openBrowser() {
baseUrl = System.getProperty("webdriver.base.url");
driver = new FirefoxDriver();
driver.get(baseUrl);
screenshotHelper = new ScreenshotHelper();
}
@After
public void saveScreenshotAndCloseBrowser() throws IOException {
screenshotHelper.saveScreenshot("screenshot.png");
driver.quit();
}
@Test
public void pageTitleAfterSearchShouldBeginWithDrupal() throws IOException {
assertEquals("The page title should equal Google at the start of the test.", "Google", driver.getTitle());
WebElement searchField = driver.findElement(By.name("q"));
searchField.sendKeys("Drupal!");
searchField.submit();
assertTrue("The page title should start with the search string after the search.",
(new WebDriverWait(driver, 10)).until(new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver d) {
return d.getTitle().toLowerCase().startsWith("drupal!");
}
}));
}
private class ScreenshotHelper {
public void saveScreenshot(String screenshotFileName) throws IOException {
File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(screenshot, new File(screenshotFileName));
}
}
}
答
的Firefox 11发布于2012年3月13日
硒2.20发布于2012年2月27日
考虑到这一点,你不能真正期望硒2.20至支持Firefox 11
目前支持的平台列表:
是我已经做到了,但不工作! – user1271229 2012-03-16 08:15:26