有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Selenium Webdriver单击不工作

我正在尝试使用selenium webdriver来自动化我的测试 我正在使用selenium 2.39.0和firefox 26.0 我试着给点击一个简单的例子,但它失败了 之所以选择该元素,是因为所选元素文本上的sysout给出了“create account”。但它无法点击按钮

 WebDriver driver = new FirefoxDriver();
driver.get("http://en.wikipedia.org/wiki/Main_Page");
System.out.println(driver.findElement(By.id("pt-createaccount")).getText());
driver.findElement(By.id("pt-createaccount")).click();
assertEquals("Create account - Wikipedia, the free encyclopedia", driver.getTitle());
driver.quit();

任何帮助都将不胜感激

试过下面所有的东西 得到了selenium谷歌集团的回复,这起到了作用

请打开系统显示设置并确保字体大小设置为100%,请参阅附带的屏幕截图。 https://code.google.com/p/selenium/issues/detail?id=6756


共 (0) 个答案