使用机器人框架时,无头铬被粘在InsecureCerts上

时间:2018-09-12 10:16:35

标签: certificate robotframework

我正在尝试在带有机器人框架的自动化测试环境中使用headlesschrome,但是我认为浏览器在绕过不安全证书页面时会卡住。我做错什么了吗?这是我的机器人文件中的代码示例:

Start test
    [Arguments]         ${site}=${DOMAIN}   ${env}=${ENVIRONMENT}
    [Documentation]     Open the browser and go to the homepage.
    Set default variables
    Start test report
    Set domain          ${site}
    Set environment     ${env}
    Set pages
    ${chrome options} =     Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys, selenium.webdriver
    Call Method    ${chrome options}   add_argument    --acceptSslCerts
    Call Method    ${chrome options}   add_argument    --acceptInsecureCerts
    ${options}=     Call Method     ${chrome_options}    to_capabilities
    Open browser        ${HOMEPAGE}         ${BROWSER}                  desired_capabilities=${options}
    Open browser report

0 个答案:

没有答案