uirecorder 自动化测试/升级chromedriver

官方 chromedriver:
https://chromedriver.chromium.org/downloads

UI Recorder 是一款面向多端的 UI 自动化录制工具,类似于Selenium IDE 但比Selenium IDE 更加强大!
UI Recorder 非常简单易用,零成本解决测试回归问题。
官方网站: https://www.yuque.com/artist/uirecorder
https://github.com/alibaba/uirecorder/blob/master/README_zh-cn.md

  1. 安装 NodeJs (版本号 >= v7.x)
    https://nodejs.org/

  2. 安装 chrome
    https://www.google.com/chrome/

  3. 安装 UI Recorder
    npm install uirecorder mocha macaca-reporter -g

  4. 安装 Java :注意不要安装java最高版本
    https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

window 10

mkdir uirecorder_test
cd uirecorder_test
#初始化测试工程安装chrome,ie等浏览器驱动,
uirecorder init
输出log如下所示:安装了selenium-standalone来启动webserver,并且安装chrome驱动chromedriver/98.0.4758.102。
此时我的chrome自动升级已是最新版本 100.0.4896.60(正式版本) (64 位)
录制测试脚本,回归测试失败!

selenium-standalone installation starting
selenium install:
from: http://npm.taobao.org/mirrors/selenium/3.141/selenium-server-standalone-3.141.59.jar

to: C:\Users\icqian\Documents\uirecorder_test\node_modules\_selenium-standalone@6.24.0@selenium-standalone\.selenium\selenium-server\3.141.59-server.jar
---
chrome install:
from: http://npm.taobao.org/mirrors/chromedriver/98.0.4758.102/chromedriver_win32.zip
to: C:\Users\icqian\Documents\uirecorder_test\node_modules\_selenium-standalone@6.24.0@selenium-standalone\.selenium\chromedriver\latest-x64-chromedriver
---
ie install:
from: http://npm.taobao.org/mirrors/selenium/3.150/IEDriverServer_x64_3.150.1.zip
to: C:\Users\icqian\Documents\uirecorder_test\node_modules\_selenium-standalone@6.24.0@selenium-standalone\.selenium\iedriver\3.150.1-x64-IEDriverServer.exe
---
firefox install:
from: http://npm.taobao.org/mirrors/geckodriver/v0.30.0/geckodriver-v0.30.0-win64.zip
to: C:\Users\icqian\Documents\uirecorder_test\node_modules\_selenium-standalone@6.24.0@selenium-standalone\.selenium\geckodriver\latest-x64-geckodriver
---
edge install:
from: https://download.microsoft.com/download/F/8/A/F8AF50AB-3C3A-4BC4-8773-DC27B32988DD/MicrosoftWebDriver.exe
to: C:\Users\icqian\Documents\uirecorder_test\node_modules\_selenium-standalone@6.24.0@selenium-standalone\.selenium\edgedriver\17134-MicrosoftEdgeDriver.exe
---
chromiumedge install:
from: https://msedgedriver.azureedge.net/100.0.1185.29/edgedriver_win64.zip
to: C:\Users\icqian\Documents\uirecorder_test\node_modules\_selenium-standalone@6.24.0@selenium-standalone\.selenium\chromiumedgedriver\latest-x64-msedgedriver
window录制脚本和启动webserver回归测试
npm run server # win+R 打开另一个dos终端运行 

uirecorder test.js
# 录制浏览器窗口最大尺寸:maximize
run.bat test.js

ERROR: “before all” hook:
Error: the string "session not created: This version of ChromeDriver only supports Chrome version 98\nCurrent browser version is 100.0.4896.60 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe\n

chrome install:
from: http://npm.taobao.org/mirrors/chromedriver/98.0.4758.102/chromedriver_win32.zip
to: C:\Users\icqian\Documents\uirecorder_test\node_modules\_selenium-standalone@6.24.0@selenium-standalone\.selenium\chromedriver\latest-x64-chromedriver

尝试修改uirecorder的chromedriver和package.json,重下uirecorder等方法 但都没有生效。
最后删掉了_selenium-standalone文件夹:C:\Users\icqian\Documents\uirecorder_test\node_modules\_selenium-standalone@6.24.0@selenium-standalone

1、重新安装selenium-standlone
npm install selenium-standalone@latest -g  

2、安装 chrome、ie、firefox、edge对应的driver
selenium-standalone install 

3、启动WebDriver服务
selenium-standalone start

4、顺利运行chrome 100
run.bat test.js


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值