安装Java selenium
上一篇 /
下一篇 2016-09-20 14:22:52
/ 个人分类:自动化测试
今天不了
Java selenium的自动化环境
1.安装 Java
2.安装 Eclipse
3.导入Selenium jar包(是selenium-server-standalone-2.53.0.jar,先前导入其他的都报错了)
环境布置好以后写了个小自动化程序:
package com.mypro.jase;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.*;
public class Login {
public static void main(String[] args)
{
System.out.println("start selenium");
WebDriver driver = new FirefoxDriver();
driver.get("http://www.yangche51.com/customer/login.aspx");
driver.close();
}
}
程序没有报错,但是运行时报错了,问了群里面的大牛们,原来是我的firefox太新了,然后重新下载安装了43版本的,运行成功!
收藏
举报
TAG:
java
Java
Selenium