一个完整的maven配置selenium webdriver工程实例(一)

来源:互联网 发布:爆破手机号软件 编辑:程序博客网 时间:2024/05/28 15:31

本文是一个完整的使用maven配置的selenium webdriver工程,主要实现了自动化测试发送邮件的功能。

第一部分:maven pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>zwyq</groupId>
  <artifactId>zwyq</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>zwyq</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <!-- 加载junit包 -->
   <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.10</version>
    <scope>test</scope>
   </dependency>
   
   <!-- 加载selenium包 -->
   <dependency>
     <groupId>org.seleniumhq.selenium</groupId>
     <artifactId>selenium-java</artifactId>
     <version>2.31.0</version>
   </dependency>

   <!-- 加载javax.mail包,用于邮件发送 -->
   <dependency>
     <groupId>javax.mail</groupId>
  <artifactId>mail</artifactId>
  <version>1.5.0-b01</version>
    </dependency>
   
    <!-- 加载读取Excle所需的jar包 -->
    <dependency>
    <groupId>net.sourceforge.jexcelapi</groupId>
  <artifactId>jxl</artifactId>
  <version>2.6.12</version>
   </dependency>    
   
   <!-- 加载excel读取所需的org.apache.poi包 -->
   <dependency>
    <groupId>org.apache.poi</groupId>
  <artifactId>poi-excelant</artifactId>
  <version>3.9</version>
   </dependency>
  </dependencies>
</project>

 

 

 

原创粉丝点击