diff --git a/.gitea/workflows/execute.yml b/.gitea/workflows/execute.yml index 875a828..82ad36e 100644 --- a/.gitea/workflows/execute.yml +++ b/.gitea/workflows/execute.yml @@ -42,5 +42,5 @@ jobs: - name: Run the pytests run: pytest -c pytest.ini -m edge - - name: Run the behave tests - run: behave +# - name: Run the behave tests +# run: behave diff --git a/browserdriver/__init__.py b/browserdriver/__init__.py index d7ef8a0..4b229e9 100755 --- a/browserdriver/__init__.py +++ b/browserdriver/__init__.py @@ -1,13 +1,14 @@ # pylint: disable=too-few-public-methods +import os import platform 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 from selenium.webdriver.edge.service import Service as EdgeService +from selenium.webdriver.firefox.options import Options as FirefoxOptions + from conftest import CWD -import os class BrowserDriver: @@ -45,9 +46,12 @@ def edge(headless=True): driver_name += ".exe" edgedriver_loc = os.path.join(CWD, 'drivers', driver_name) - print("***** DRIVER LOCATION *****") + print("***** DRIVER DEFINED LOCATION *****") print(edgedriver_loc) - print("***** DRIVER LOCATION *****") + if os.path.isfile(edgedriver_loc): + print(f'\nThe file {edgedriver_loc} exists.\n') + else: + print(f'\nThe file {edgedriver_loc} does not exist!\n') options.use_chromium = True options.add_argument('disable-gpu') diff --git a/pytests/test_basic.py b/pytests/test_basic.py index 3e8c65b..23373d9 100644 --- a/pytests/test_basic.py +++ b/pytests/test_basic.py @@ -1,7 +1,6 @@ import pytest from browserdriver import BrowserDriver -from conftest import CWD @pytest.mark.firefox @@ -34,4 +33,3 @@ def test_edge_browser(headless): bd.get('https://test.io') assert bd.title == "Home | Test IO" bd.quit() -