Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIrecorder及nvm 使用记录 #13

Open
ciuji opened this issue Jul 3, 2018 · 0 comments
Open

UIrecorder及nvm 使用记录 #13

ciuji opened this issue Jul 3, 2018 · 0 comments
Labels
work notes for work
Milestone

Comments

@ciuji
Copy link
Owner

ciuji commented Jul 3, 2018

uirecorder guide

环境配置

  1. 注意:NodeJs版本要求:v7.x <= version < v10.x

  2. 安装chrome

  3. 安装 UI Recorder

    npm install uirecorder mocha -g

    因为chromedriver的服务器需要通过代理访问,所以建议使用cnpm安装

    cnpm install uirecorder mocha -g

使用UI Recorder进行脚本录制

  1. 初始化UI Recorder并进行配置,可以直接全部回车忽略

    uirecorder init
  2. 开启脚本录制

    uirecorder start
  3. 关闭所有属性:在左下角的工具栏中关闭属性,或加入要屏蔽的属性名称(使用相对位置,以避免随机属性名导致的不一致问题),屏蔽规则遵循正则表达式

    avatar

  4. 执行测试操作,完成后点击结束,脚本会保存在./sample目录中

运行脚本

  1. 开启ChromeDriver服务

    npm run server
  2. 双击根目录中的run.bat运行脚本

  3. 打开 ./reports/index.html 查看报告

注意事项

  1. 因为csc首页加载的时间超时导致后续操作报错。

    解决方法:修改脚本文件,将页面打开后的第一个操作的sleep时间延长。(既把报错操作的sleep时间加长)

    example:

    it('click: 服务 ( li:nth-child(11) > a.sapUiUx3NavBarItem, 38, 14, 0 )', async function(){
        await driver.sleep(60000).wait('li:nth-child(11) > a.sapUiUx3NavBarItem', 30000)
               .sleep(300).mouseMove(38, 14).click(0);
    });

参考链接

  1. UI Recorder官网: uirecorder.com

  2. 前端自动化测试之UI Recorder

  3. UIRecorder PC标准入门

  4. npm error in nvm

environment setup

Windows上安装nodejs版本管理器nvm

前端自动化测试之UI Recorder

@ciuji ciuji added the work notes for work label Oct 17, 2018
@ciuji ciuji added this to the Note milestone Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work notes for work
Projects
None yet
Development

No branches or pull requests

1 participant