selenium Cannot call non W3C standard command while in W3C mode解决

在使用selenium进行UI自动化,控制页面做上下滑动的时候遇到了如下报错selenium.common.exceptions.WebDriverException: Message: unknown command: Cannot call non W3C standard command while in W3C mode

解决方法:

opt =webdriver.ChromeOptions()
opt.add_experimental_option('w3c',False)
dr= webdriver.Chrome(chrome_options=opt)

 

 


关注公众号,了解更多it技术(it问答网

发表评论

电子邮件地址不会被公开。