Selenium:InternetExplorerDriver:禁用JavaScript
如何使用InternetExplorerDriver禁用JavaScript 我有以下内容,但它似乎没有禁用JavaScript:Selenium:InternetExplorerDriver:禁用JavaScript,javascript,selenium,webdriver,Javascript,Selenium,Webdriver,如何使用InternetExplorerDriver禁用JavaScript 我有以下内容,但它似乎没有禁用JavaScript: self.selenium = webdriver.Remote( command_executor="http://localhost:4444/wd/hub", desired_capabilities={ 'platform': 'WINDOWS', 'browserName': 'internet explorer',
self.selenium = webdriver.Remote(
command_executor="http://localhost:4444/wd/hub",
desired_capabilities={
'platform': 'WINDOWS',
'browserName': 'internet explorer',
'version': '',
'javascriptEnabled': False})
不能在IE驱动程序中禁用JavaScript。您请求的
DesiredCapabilities
不一定是所创建驱动程序实例的功能。也就是说,如果驱动程序不支持您请求的功能,它不会抛出错误;相反,它返回驱动程序实例正在使用的实际功能。详细介绍WebDriver API的这一特定细节
此外,IE驱动程序的大部分功能(以及目前所有的驱动程序)都是用JavaScript实现的。这意味着禁用JavaScript会使IE驱动程序的大部分(实际上是目前所有的驱动程序)变得无用