1. Support all user operation: key event, mouse event, alert, file upload, drag, svg, shadow dom
2. Support mobile native APP(Android, iOS) recorde, powered by Macaca 3. No interference when recording: the same as self test
4. Record test file saved in local
5. Support kinds of expect: val,text,displayed,enabled,selected,attr,css,url,title,cookie,localStorage,sessionStorage
6. Support image diff
7. Support powerful var string
8. Support common test case: one case call another
9. Support parallel test
10. Support i18n: en, zh-cn, zh-tw
11. Support screenshots after each step
12. Support HTML report & JUnit report
13. Support multi systems: Windows, Mac, Linux
14. Test file base on NodeJs: jWebDriver
1. Install Visual Studio Code & open Visual Studio Code
2. Open the project root folder by vs code
3. Open test file, add break point
4. press F5 key to start, press F10 key to run next line
1. Because some attribute values are random or unstable, we can't record a stable CSS selector
2. 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?
1. Record commons/login.mod.js 2. Record sample/test.spec.js
1. please input login.mod.js in recorder start page or jump test case in page
2. After login.mod.js loaded, then recorder other steps
3. source run.sh ( Linux|Mac ) or run.bat ( Windows )
How to record file upload?
1. UI Recorder only support native file compont
2. direct click or click , the placeholder button must mark as upload with role or data-role 3. File must save to uploadfiles/ directory
1. start with url: http://xxx.com/product?id={{productId}} 2. add new var with tool panel
3. update var with tool panel
4. jump url with tool panel: http://xxx.com/product?id={{productId}} 5. insert vars string with tool panel: {{productName}} or aaa{{productName}}bbb 6. 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?
1. Press down Ctrl or Command button
2. Click Add Hover Button, enter hover mode
3. Release Ctrl or Command button
4. Click the dom you want to hover (can add multiple)
5. Click Add Expect Button
6. Click the dom you want to expect
7. Press Esc button or click End Hover Button, exit hover mode
How to expect the value after js eval in front browser?
1. Add Expect, select type jscode 2. sync mode: return document.title 3. function mode:
1. uirecorder init 2. Input css selector when init Hide before expect 3. uirecorder start 4. UIRecorder will hide matched doms before expect, then you can expect the dom behind the mask div
How to record option click?
Some steps is not very important, but occasionally displayed, this steps will expect to success always.
1. don't change url in location bar
2. don't change focus by TAB key
3. don't use dblclick, WebDriver no support
4. don't select text by mouse, WebDriver no support
5. don't focus to background window manualy
6. don't click useless DOM, only record key steps
How develop test friendly code?
1. please dont't use random id or name
2. please name a id for DOM area
3. add label for form
4. please listen click event instead of mousedown
How to set udid to mobile test?
1. export devices=xxx1,xxx2 (windows: set devices=xxx1,xxx2)
2. source run.sh ( Linux|Mac ) or run.bat ( Windows )
How to save raw cmds json?
1. uirecorder start --raw 2. After test saved, then you can get 2 files: sample/test.spec.js, sample/test.spec.json