Selenium Webdriver switchTo()方法在Chrome 75中失败 [英] Selenium Webdriver switchTo() method fails in Chrome 75
本文介绍了Selenium Webdriver switchTo()方法在Chrome 75中失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用Selenium切换到打开的选项卡在Chrome 74中可以正常工作.但是,在75中,我收到此消息:
Switching to an open tab with Selenium works fine in Chrome 74. However, in 75 I get this message:
org.openqa.selenium.InvalidArgumentException: invalid argument: 'handle' must be a string
除了将Chrome版本固定为74以外,还有其他人会遇到这种情况吗,以及如何解决?
Does anyone else encounter this and how can this be solved except for pinning the Chrome version to 74?
推荐答案
我能够通过在测试中添加以下特定于浏览器堆栈的功能来解决错误-
I was able to resolve the error by adding the below browserstack specific capability in my tests-
'browserstack.use_w3c' : 'true'
这篇关于Selenium Webdriver switchTo()方法在Chrome 75中失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文