# selenium-spoon-sampler
**Repository Path**: yeetrack/selenium-spoon-sampler
## Basic Information
- **Project Name**: selenium-spoon-sampler
- **Description**: selenium使用selenium-spoon-plugin样例工程
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2015-02-10
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
#Selenium使用selenium-spoon-plugin样例工程#
=====================
使用方式:
在你的selenium项目的pom中添加下面的依赖:
com.yeetrack.selenium
spoon
1.0
添加plugin:
com.yeetrack.selenium
spoon
1.0
spoon report
post-integration-test
spoon
注意:如果在maven repo仓库中找不到selenium-spoon的包,可以将selenium-spoon的包安装到本地maven仓库里,方法是:
+ 下载插件源码,github地址: [https://github.com/yeetrack/selenium-spoon-plugin](https://github.com/yeetrack/selenium-spoon-plugin)
+ 在插件项目跟路径执行 `mvn clean install`
在截图时,不要再使用selenium提供的方法,要使用插件提供的方法:
DriverCapture.snapShot("这里输入图片描述", driver);
插件使用log4j日志框架,已经添加了log4j的包,这里直接使用即可。
Logger logger = LoggerFactory.getLogger(HelloWorld.class);
logger.info("info");
logger.debug("debug");
logger.error("error");
执行:
mvn clean install
截图存放路径:**target/screenshots**
html报告路径: **target/screenshotResult/report**