51Testing软件测试论坛

标题: selenium 2.53火狐可启动浏览器不能打开URL [打印本页]

作者: 今夜花未眠    时间: 2016-8-8 10:14
标题: selenium 2.53火狐可启动浏览器不能打开URL
eclipes jee-June -sr2
FF。46
selenium 2.53
win7 64bit
jdk 8u102

代码
package vv1;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.*;
        public class zc1 {
        public static void main(String[] args) {
        System.out.println("srart selenium");
        WebDriver driver = new FirefoxDriver();
        driver.get("http://www.baidu.com/");
       
        //driver.navigate().to("www.baidu.com/");
        System.out.println("srart selenium1");
        WebElement txtbox=driver.findElement(By.id("kw"));
        txtbox.sendKeys(new String[]{"selenium java"});
        WebElement btn=driver.findElement(By.id("su"));
        btn.click();
        driver.close();
        System.out.println("end selenium");
        }
        }

作者: 今夜花未眠    时间: 2016-8-8 10:46
求告知
作者: 若尘_51    时间: 2016-8-8 11:24
应该是你的火狐浏览器版本与selenium2.53不兼容导致的。
可以看看http://bbs.51testing.com/thread-1083076-1-1.html,对照下是不是报一样的错误
作者: 小欣欣_000    时间: 2016-9-1 11:59
能给我发一个selenium2.53 吗




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2