答案 0 :(得分:7)
在DesiredCapabilities的Selenium文档中,列出了可配置的属性。必需的属性是ignoreProtectedModeSettings,必须设置为True
connection.execute(<<-SQL)
insert into country1 (col1, col2)
select col1, col2 from countries
SQL
答案 1 :(得分:1)
对于任何来这里寻求在Robot Framewor中解决this problem的人:
Set Chrome Desired Capabilities
[Documentation] Create the desired capabilities object with which to instantiate the Chrome browser.
${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
${experimental_options} Create Dictionary useAutomationExtension ${False}
Set To Dictionary ${dc} chromeOptions ${experimental_options}
Set Global Variable ${DESIRED_CAPABILITIES} ${dc}
答案 2 :(得分:0)
正如Pavol Travnik所述,David的答案不再有效。在某个时刻,ignoreProtectedModeSettings
键被放置在功能字典中的se:ieOptions
字典中。以下是适用于IEDriverServer较新版本的代码:
${ie_dc} = Evaluate
... sys.modules['selenium.webdriver'].DesiredCapabilities.INTERNETEXPLORER
... sys, selenium.webdriver
${ieOptions} = Create Dictionary ignoreProtectedModeSettings=${True}
Set To Dictionary ${ie_dc} se:ieOptions ${ieOptions}
Open Browser ${url} ie desired_capabilities=${ie_dc}
如果您调试Selenium的Python库(尤其是webdriver / remote / webdriver.py)并查看start_session
中的响应,就可以看到此内容。