问题
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
Does anyone else encounter this and how can this be solved except for pinning the Chrome version to 74?
回答1:
I was able to resolve the error by adding the below browserstack specific capability in my tests-
'browserstack.use_w3c' : 'true'
来源:https://stackoverflow.com/questions/56538895/selenium-webdriver-switchto-method-fails-in-chrome-75