Fix tests
This commit is contained in:
@@ -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)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 117 KiB |
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user