如何禁用Python Selenium Remote Webdriver和Internet Explorer的本机事件?
可能相关:我专门尝试使用BrowserStack的Internet Explorer 9、10进行自动化测试。
目前,我由此构建了远程Webdriver:
import webdriver
url = "https://%(username)s:%(automate_key)[email protected]/wd/hub" % {
'username': 'foo',
'automate_key': 'fookey'
}
capabilities = webdriver.DesiredCapabilities.INTERNETEXPLORER.copy()
capabilities['platform'] = "WINDOWS"
capabilities['version'] = "9" # IE9
driver = webdriver.Remote(url, desired_capabilities=capabilities)
最佳答案
未经测试,但我相信您正在寻找nativeEvents
功能:
capabilities['nativeEvents'] = False
参考:
https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities#read-write-capabilities
关于python - 禁用Internet Explorer的远程WebDriver的 native 事件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/45109492/