Compare commits

..

No commits in common. "842ddb43992d6d2d429bab0ed97667fbf5bf5e88" and "c1c3fd1f28ebe54c71aba9dcc359ba6bc1c0bde5" have entirely different histories.

2 changed files with 12 additions and 14 deletions

View File

@ -16,6 +16,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
apt search firefox
apt search chrom
apt search driver
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Run the pytests

View File

@ -1,8 +1,5 @@
# pylint: disable=too-few-public-methods
from selenium import webdriver
from selenium.webdriver.chrome.options import Options as ChromeOptions
from selenium.webdriver.firefox.options import Options as FirefoxOptions
from selenium.webdriver.edge.options import Options as EdgeOptions
class BrowserDriver:
@ -18,28 +15,26 @@ class BrowserDriver:
def chrome(headless=True):
options = ChromeOptions()
if headless:
options.add_argument("--headless")
options = webdriver.ChromeOptions()
options.headless = headless
options.add_argument('--ignore-certificate-errors')
return webdriver.Chrome(options=options)
def firefox(headless=True):
options = FirefoxOptions()
if headless:
options.add_argument("--headless")
options = webdriver.FirefoxOptions()
options.accept_insecure_certs = True
options.headless = headless
options.add_argument('--ignore-certificate-errors')
return webdriver.Firefox(options=options)
def edge(headless=True):
options = EdgeOptions()
options = webdriver.EdgeOptions()
options.use_chromium = True
options.add_argument('disable-gpu')
if headless:
options.add_argument('headless')
return webdriver.Edge(options=options)
options.headless = headless
driver = webdriver.Edge(options=options)
return driver
def safari():