Recording Browser Interactions And Generating Test Scripts.
The softest is a test tool for recording browser interactions and generating test scripts, simple and practical. It allows you to get test scripts without writing code.
When I needed a tool that could record browser interactions and generate corresponding scripts, I found puppeteer-recorder and Selenium IDE, of course, they are excellent projects. But I found that they can't support multi-tab recording, screenshots, etc., and Selenium IDE always gives an error when playing a script, so I made this wheel.
Tab switching rules: temporarily not support manual tapping tabs to switch pages. For example, opened three tabs, currently in the latest tab3, you can't manually switch to tab2 or tab1 at this time, which will cause inconsistency, but you can go back to tab2 through close tab3, then close tab2 and return to tab1.
$ npm i -g softest
The softest is based on Puppeteer, when downloading Puppeteer, Chromium will be downloaded by default. Chinese users may be affected by GFW. If you encounter difficulties, you can move to README-Zh.md.
Add environment variables to facilitate running commands:
$ export PATH=$PATH:$HOME/.npm-global/bin
softesthas only a few parameters:
$ softest --help Usage: index [options]
Options: -h, --host Server hostname, optional. (default: "127.0.0.1") -p, --port Server port, optional. (default: 2333) -c, --chromium The absolute path of the chromium execution file, necessary. -r, --report The absolute path of the test report, necessary. -h, --help output usage information
To run the
softestcommand, you need to specify the directory where the Chromium and the directory where the test report is saved:
$ soft -c PATH_CHROMIUM -r PATH_REPORT
If you don't know where the Chromium is, you can start Chromium and typechrome://version/in the address bar to find the location of its executable.
If you see an output similar to the following, congratulations 🎉🎉🎉👏
_______ _______ _______ _______ _______ _______ _______ | || || || || || || | status: running | _____|| _ || ___||_ _|| ___|| _____||_ _| host: 127.0.0.1 | |_____ | | | || |___ | | | |___ | |_____ | | port: 2333 |_____ || |_| || ___| | | | ___||_____ | | | _____| || || | | | | |___ _____| | | | |_______||_______||___| |___| |_______||_______| |___|
🎉 Running WebSocket server successfully
🎉 Running HTTP server successfully
Open a browser, type
port, you will see the following web interface:
Please give a ⭐️ if this project helped you!
If you have any questions or requests or want to contribute to
moveableor other packages, please write the issue or give me a Pull Request freely.
If you find a bug, please report to us opening a new Issue on GitHub.
See LICENSE for more information.