一、配置文件

  • config.json:UIRecorder 工程相关配置
{
    "webdriver": {
        "host": "127.0.0.1",                      // WebDriver服务host
        "port": "4444",                           // WebDriver服务端口
        "browsers": "chrome, ie 11, firefox",     // 回归测试浏览器类型/版本
        "chromeOptions": {                        
          "w3c": false
        }
    },                                        
    "vars": {},                                   // 全局变量
    "reporter": {
        "distDir": ""                             // 自定义生成报告路径
    },
    "screenshots": {
        "captureAll": true                        // false 代表只在回归不通过步骤截图
    },
    "recorder": {
        "pathAttrs": "data-id,data-name,type,data-type,role,data-role,data-value",
        "attrValueBlack": "",
        "classValueBlack": "",
        "hideBeforeExpect": ""
    }
}
  • hosts:hosts文件
127.0.0.1 localhost

  回归测试指定 WebDriver 版本,参考 selenium-standalone 配置 command :https://www.npmjs.com/package/selenium-standalone#command-line-interface ,修改工程目录 package.jsoninstalldriver 命令即可。(一般建议使用最新版本,降低后续维护成本)

相关文章:

  • 2021-05-15
  • 2021-12-05
  • 2022-01-08
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-10-13
猜你喜欢
  • 2021-11-11
  • 2021-11-07
  • 2021-12-02
  • 2021-10-09
  • 2021-08-07
  • 2021-11-18
  • 2022-01-09
相关资源
相似解决方案