Win10系统自动化测试环境的搭建:
-
下载安装Java 1.8 JDK,具体步骤可以参考:https://jingyan.baidu.com/article/6b97984dd257b41ca2b0bf86.html
-
下载安装eclipse,具体步骤可以参考:https://jingyan.baidu.com/article/08b6a59193695914a80922e8.html
-
Selenium 官网下载各个浏览器的WebDriver:https://www.seleniumhq.org/download/
注意浏览器的Driver和本地安装的浏览器版本要匹配还要和Selenium的版本匹配 -
下载安装Maven环境: https://jingyan.baidu.com/article/046a7b3e80bc06f9c27fa9bb.html
-
Maven将中央仓库修改为阿里云的仓库地址:
修改:D:\apache-maven-3.5.3\conf\settings.xml<mirrors> <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/repositories/central/</url> </mirror> <mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云公共仓库</name> <url>https://maven.aliyun.com/repository/public</url> </mirror> </mirrors>
-
在eclipse中导入一个maven的项目,利用项目中的pom.xml文件来下载更新所需要的依赖包:
<modelVersion>4.0.0</modelVersion> <groupId>net.digitary</groupId> <artifactId>DigitaryAutoTest</artifactId> <version>0.0.1-SNAPSHOT</version> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency>