Skip to content

Commit

Permalink
Merge pull request #167 from mdpdesign/add-chrome-driver-kwargs-example
Browse files Browse the repository at this point in the history
Add Splinter driver kwargs Chrome example override
  • Loading branch information
mpasternak authored Aug 8, 2022
2 parents 47141cd + 57a1c1d commit c69d567
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,26 @@ Fixtures
"""
return {"service_log_path": Path("/log/directory/geckodriver.log")}
The snippet below configures Chrome to ignore certificate errors and sets a specific window size

.. code-block:: python
import pytest
from selenium import webdriver
@pytest.fixture(scope='session')
def splinter_driver_kwargs():
"""Override Chrome WebDriver options"""
chrome_options = webdriver.ChromeOptions()
# List of Chromium Command Line Switches
# https://peter.sh/experiments/chromium-command-line-switches/
chrome_options.add_argument("--window-size=1440,1200")
chrome_options.add_argument("--ignore-ssl-errors=yes")
chrome_options.add_argument("--ignore-certificate-errors")
return {"options": chrome_options}
* splinter_window_size
Size of the browser window on browser initialization. Tuple in form (<width>, <height>). Default is (1366, 768)

Expand Down

0 comments on commit c69d567

Please sign in to comment.