一、使用IDEA添加依赖
1.新建maven项目
2.在pom.xml中添加下面代码
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
或在maven仓库搜索Selenium Java找最新版
地址:https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java
二、driver驱动安装配置
1.查看浏览器版本(若不是最新版 更新到最新版)