问题
While browsing URL using the robot automation framework, I am always getting a message "Your connection is not private". Then we need to click on Advanced and Proceed to URL. Manually proceeding to URL is not possible. So is there any solution to skip such certificate checking for test automation in the robot framework. I had read the answer for the question: How to resolve ssl certificate errors for test automation in robot framework . I tried following but it didn't work.
Open Browser ${loginUrl} browser=${browser} options=add_argument("--ignore-certificate-errors")
The error says:
- Positional argument cannot be used after named arguments. Although this argument looks like named one, it isn't because there is no 'options' argument in the keyword definition
Please help.
回答1:
You can try with creating web driver and set parameters separately as shown below.
*** Test Cases ***
TestProcess
${chrome_options} Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome_options} add_argument --ignore-certificate-errors
Create Webdriver Chrome chrome chrome_options=${chrome_options}
Go To https://expired.badssl.com/
来源:https://stackoverflow.com/questions/60490989/ignore-or-resolve-certificate-warnings-for-test-automation-in-robot-framework