Because some attribute values are random or unstable, we can’t record a stable CSS selector
We can filter the attributes with a blacklist. You can type uirecorder init and then input the blacklist from the command line
Tip: blacklist is a regex, you can use it like this: /attr_\d+/
How to record common test case?
Record commons/login.mod.js
Record sample/test.spec.js
please input login.mod.js in recorder start page or jump test case in page
After login.mod.js loaded, then recorder other steps
source run.sh ( Linux|Mac ) or run.bat ( Windows )
How to record file upload?
UI Recorder only support native file compont
direct click <input type="file"> or click <button role="upload">Upload file</button>, the placeholder button must mark as upload with role or data-role
start with url: http://xxx.com/product?id={{productId}}
add new var with tool panel
update var with tool panel
jump url with tool panel: http://xxx.com/product?id={{productId}}
insert vars string with tool panel: {{productName}} or aaa{{productName}}bbb
expect to var string: {{productName}} or aaa{{productName}}bbb
Tip: All var string also support js template string, For example: {{productName}}, ${new Date().getTime()}, ${parseInt(testVars.a)+parseInt(testVars.b)}
How to add hover multiple or add expect after a hover?
Press down Ctrl or Command button
Click Add Hover Button, enter hover mode
Release Ctrl or Command button
Click the dom you want to hover (can add multiple)
Click Add Expect Button
Click the dom you want to expect
Press Esc button or click End Hover Button, exit hover mode
How to expect the value after js eval in front browser?
UI Recorder
UI Recorder is multi-platform UI test case recorder like Selenium IDE but more powerful than Selenium IDE!
UI Recorder is easy to use, even zero cost.
Features
Contributors
itestauipi
Stngle
yaniswang
xudafeng
undead25
stevobm
micosty
ali-lion
alibaba-oss
felizalde
portokallidis
snapre
paradite
WingOfTime
zquancai
This project follows the git-contributor spec, auto updated at
Sat Apr 30 2022 21:11:26 GMT+0800.Screenshots
Video demo
Quick start
Install
Install NodeJs (version >= v7.x)
Install chrome
Install UI Recorder
PC record
Init test project
Start record test case
Start WebDriver Server
Run test case
Get reports & screenshots
More Platform Support
Install & start macaca server:
Init test project
Start record test case
Run test case
Get reports & screenshots
Documentation Translations
QA
How to debug test code
F5key to start, pressF10key to run next lineHow to deploy WebDriver Server
How to run selenium standalone server?
Selenium Grid: https://github.com/SeleniumHQ/selenium/wiki/Grid2
F2etest: https://github.com/alibaba/f2etest
How to change webdriver host & port by env temporary, debug for local?
export webdriver=127.0.0.1:4444orset webdriver=127.0.0.1:4444(Windows)Tip: port is not required, For example:
export webdriver=127.0.0.1How to dock Jenkins?
Add commands
Add reports
How to filter unstable path
uirecorder initand then input the blacklist from the command lineTip: blacklist is a regex, you can use it like this:
/attr_\d+/How to record common test case?
Record
commons/login.mod.jsRecord
sample/test.spec.jslogin.mod.jsin recorder start page or jump test case in pagelogin.mod.jsloaded, then recorder other stepssource run.sh( Linux|Mac ) orrun.bat( Windows )How to record file upload?
<input type="file">or click<button role="upload">Upload file</button>, the placeholder button must mark asuploadwithroleordata-roleuploadfiles/directoryHow to use vars
edit config.json
http://xxx.com/product?id={{productId}}http://xxx.com/product?id={{productId}}{{productName}}oraaa{{productName}}bbb{{productName}}oraaa{{productName}}bbbTip: All var string also support js template string, For example:
{{productName}}, ${new Date().getTime()}, ${parseInt(testVars.a)+parseInt(testVars.b)}How to add hover multiple or add expect after a hover?
CtrlorCommandbuttonAdd HoverButton, enter hover modeCtrlorCommandbuttonAdd ExpectButtonEscbutton or clickEnd HoverButton, exit hover modeHow to expect the value after js eval in front browser?
Add Expect, select typejscodesync mode:
return document.titlefunction mode:
async mode:
How to hide doms before expect?
uirecorder initHide before expectuirecorder startHow to record option click?
Some steps is not very important, but occasionally displayed, this steps will expect to success always.
How to use image diff?
Install GraphicsMagick
Add expect with imgdiff
Rebuild the baseline image
Can’t do when recording
How develop test friendly code?
How to set udid to mobile test?
export devices=xxx1,xxx2(windows:set devices=xxx1,xxx2)source run.sh( Linux|Mac ) orrun.bat( Windows )How to save raw cmds json?
uirecorder start --rawsample/test.spec.js,sample/test.spec.jsonOther Tips
License
UIRecorder is released under the MIT license.
Thanks