Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macos tests #556

Merged
merged 1 commit into from
Jul 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tests/test_chrome_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os

import pytest
import browsers
from selenium import webdriver

from webdriver_manager.chrome import ChromeDriverManager
Expand Down Expand Up @@ -51,8 +52,10 @@ def test_chrome_manager_with_wrong_version():


def test_chrome_manager_with_selenium():
options = webdriver.ChromeOptions()
options.binary_location = browsers.get("chrome")["path"]
driver_path = ChromeDriverManager().install()
driver = webdriver.Chrome(service=Service(driver_path))
driver = webdriver.Chrome(service=Service(driver_path), options=options)
driver.get("http://automation-remarks.com")
driver.close()

Expand All @@ -69,9 +72,11 @@ def test_driver_with_ssl_verify_disabled_can_be_downloaded(ssl_verify_enable):


def test_chrome_manager_cached_driver_with_selenium():
options = webdriver.ChromeOptions()
options.binary_location = browsers.get("chrome")["path"]
custom_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "custom-cache")
manager = ChromeDriverManager(cache_manager=DriverCacheManager(custom_path))
driver = webdriver.Chrome(service=Service(manager.install()))
driver = webdriver.Chrome(service=Service(manager.install()), options=options)
driver.get("http://automation-remarks.com")

metadata_file = os.path.join(custom_path, ROOT_FOLDER_NAME, 'drivers.json')
Expand Down