File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,26 @@ Fixtures
147
147
"""
148
148
return {" service_log_path" : Path(" /log/directory/geckodriver.log" )}
149
149
150
+ The snippet below configures Chrome to ignore certificate errors and sets a specific window size
151
+
152
+ .. code-block :: python
153
+
154
+ import pytest
155
+ from selenium import webdriver
156
+
157
+ @pytest.fixture (scope = ' session' )
158
+ def splinter_driver_kwargs ():
159
+ """ Override Chrome WebDriver options"""
160
+ chrome_options = webdriver.ChromeOptions()
161
+
162
+ # List of Chromium Command Line Switches
163
+ # https://peter.sh/experiments/chromium-command-line-switches/
164
+ chrome_options.add_argument(" --window-size=1440,1200" )
165
+ chrome_options.add_argument(" --ignore-ssl-errors=yes" )
166
+ chrome_options.add_argument(" --ignore-certificate-errors" )
167
+
168
+ return {" options" : chrome_options}
169
+
150
170
* splinter_window_size
151
171
Size of the browser window on browser initialization. Tuple in form (<width>, <height>). Default is (1366, 768)
152
172
You can’t perform that action at this time.
0 commit comments