brower.acceptAlert不是webdriverIO中的函数

问题描述 投票:0回答:1

我正在使用webdriver.io编写一组测试用例。

npm-v 6.4.1,节点-v 10.11.0,wdio-mocha-framework:^ 0.6.4,wdio-phantomjs-service:^ 0.2.2,wdio-selenium-standalone-service:0.0.12,网络驱动程序:^ 5.18.6,webdriverio”:^ 4.14.1

Alert that i need to accept

我需要在chrome浏览器中接受一个带有浏览器的警报框。acceptAlert();它不起作用并显示此错误。

The error I am getting while using this code

javascript node.js mocha webdriver-io
1个回答
0
投票

功能browser.acceptAlert()仅在webdriverIO v5中起作用。

您使用的是webdriverIO v4,因此请尝试在wdio v4 browser.alertAccept()中做更多的documentation

© www.soinside.com 2019 - 2024. All rights reserved.