Fix tests

This commit is contained in:
Ivan Vazhenin
2023-07-04 19:13:49 +03:00
parent bde3749cd4
commit cd1c20d054
3 changed files with 3 additions and 2 deletions

View File

@@ -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)