1, first look at the official address, see if this is not the test tool you want
Https://macacajs.github.io/macaca/environment-setup.html
2. Remove sudo---sudo chown-r $USER/usr/local
3. Global Installation Automation Test Tool command----NPM i macaca-cli-g
4. Modify the local host---sudo vim/etc/hosts
Add a record 127.0.0.1 localhost
5, go to GitHub download demo project to local
Https://github.com/xudafeng/macaca-test-sample
In the command execution sequence
https://github.com/xudafeng/macaca-test-sample
因为我用的是chrome浏览器,所以要修改文件 macaca-test/macaca-desktop-sample.test.js
' Use strict ';
var wd = require (' webdriver-client ') ({
PlatformName: ' Desktop ',
Browsername: ' Chrome '----------this change to Chrome
});
然后执行下面代码
$ make test-pc
Because I currently only use the PC's automated testing, iOS and Android are not introduced here.
[Automation Platform Series]-Initial use of macaca-front-end automation testing