diff --git a/conftest.py b/conftest.py index d8e607d..77a564b 100644 --- a/conftest.py +++ b/conftest.py @@ -2,6 +2,7 @@ import pytest import logging import allure from selenium.webdriver import Chrome, ChromeOptions +from selenium.webdriver.chrome.service import Service class Config: @@ -13,7 +14,7 @@ class Config: def driver(): options = ChromeOptions() options.add_argument("--headless") - webdriver = Chrome('/home/ashatora/yandexdriver', options=options) + webdriver = Chrome(service=Service(executable_path='/home/ashatora/yandexdriver'), options=options) webdriver.implicitly_wait(2) yield webdriver allure.attach(webdriver.current_url, "last url", allure.attachment_type.URI_LIST) diff --git a/screenshot_tests/tests/test_s57_style.png b/screenshot_tests/tests/test_s57_style.png index b68ffe2..fdf6467 100644 Binary files a/screenshot_tests/tests/test_s57_style.png and b/screenshot_tests/tests/test_s57_style.png differ diff --git a/screenshot_tests/utils/screenshots.py b/screenshot_tests/utils/screenshots.py index bbccc11..80fbf8c 100644 --- a/screenshot_tests/utils/screenshots.py +++ b/screenshot_tests/utils/screenshots.py @@ -246,7 +246,7 @@ class TestCase(common.TestCase): def check_by_screenshot_file(self, element, *args, **kwargs): diff, test_url = self._get_screenshot_diff(element, *args, **kwargs) - assert diff == 0, f"Элемент отличается на странице:\n{test_url.geturl()}\n" + assert diff == 0, f"Элемент отличается на странице:\n{test_url}\n" def save_screenshot(self, screenshot_path, element=None, action=None, full_screen=True, full_page=False, finalize=None, scroll_and_screen=True): if full_screen: