Selenium-spoon-plugin plug-in development

Source: Internet
Author: User

Selenium is widely used for automated testing of web systems. It supports multiple languages such as Java, Python, and C #. Java is used in this article. The Code is as follows:
 
File file = (takesscreenshot) driver). getscreenshotas (outputtype. File); fileutils. copyfile (file, new file ("screen.png "));

Later, when I used robotium to write Android automation, I found the Android-Spoon plug-in on GitHub. This plug-in can generate HTML reports during Android automation and provide single-host image preview, multi-host image comparison and other functions. As a result, selenium can also be used. Initially implemented and gradually improved. The following functions are available:

    • HTML browsing in case executed on a separate browser

    • Preview GIF dynamic images of a single case

    • View logs during case execution (using log4j)

Plug-in source https://github.com/yeetrack/selenium-spoon-plugin
Selenium sample engineering https://github.com/yeetrack/selenium-spoon-sampler using this plug-in

Report preview generated by plug-in: http://htmlpreview.github.io /? Bytes.

As follows:

Plugin usage:
Add the following dependency to the POM of your selenium project:

<Dependency> <groupid> com. yeetrack. Selenium </groupid> <artifactid> spoon </artifactid> <version> 1.0 </version> </dependency>

Add Plugin:

<Plugin> <groupid> COM. yeetrack. selenium </groupid> <artifactid> spoon </artifactid> <version> 1.0 </version> <executions> <execution> <ID> spoon Report </ID> <phase> post -Integration-test </phase> <goals> <goal> spoon </goal> </goals> </execution> </executions> </plugin>

Note: If the selenium-Spoon package cannot be found in the maven repo repository, you can install the selenium-Spoon package in the local Maven repository:

    • Download plug-in source code, GitHub address: https://github.com/yeetrack/selenium-spoon-plugin

Continue reading -->

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.