Simple Introduction
Once the environment has been built, the script can be recorded.
Actual operation one, recording script
1. Initialize the configuration UI Recorder
Execute cmd command: Uirecorder Init
Initialization
Here you can enter directly, the browser I chose Chrome, choose the default. However, it is important to note that your path is a good way to create a directory that is specifically saved to the script for subsequent administration.
2. Record the script to open
Execute cmd command: Uirecorder start
Record Open
Here will open two browsers, the script name is also its own definition, the browser window size can also be defined, one is directly operated, one is verified:
Operation
Check
3. Start recording
Enter Address
Detection is also synchronous
Input Macaca
Click End Recording Save Script
Recording complete
Script view second, script playback
1. Start the server
Execute cmd command: Selenium-standalone start
Error
Note: This may be an error, unable to start the service, but can be saved, use the selenium-standalone install instructions for some dependent installation.
Error
Here still will error, but do not be afraid, or can be saved, is to do more than a few times on it.
Success
Service startup
2. Playback Script Test.1.js
Execute cmd command: Mocha sample/test.1.js
You can view the steps of the playback script, execution time, execution results, etc. in the cmd window.
Execute success three, run test case
1. Run All scripts: Run.bat
2. Run a single script: Run.bat sample/test.1.js
You can see the steps to run the script, execution time, execution results, etc. in the cmd window.
Run successfully
3. View the report
View reports within the Reports folder
Reporting to this end, the automation of the web is done, and next look at the mobile test. Reference: UI Recorder Installation Tutorial (i)
UI Recorder Web Automation