make screenshots
This commit is contained in:
@@ -2,7 +2,6 @@ import pytest
|
||||
import logging
|
||||
import allure
|
||||
from selenium.webdriver import Chrome, ChromeOptions
|
||||
from webdriver_manager.chrome import ChromeDriverManager
|
||||
|
||||
|
||||
class Config:
|
||||
@@ -14,8 +13,8 @@ class Config:
|
||||
def driver():
|
||||
options = ChromeOptions()
|
||||
options.add_argument("--headless")
|
||||
webdriver = Chrome(ChromeDriverManager().install(), desired_capabilities=options.to_capabilities())
|
||||
webdriver.implicitly_wait(5)
|
||||
webdriver = Chrome('/home/ashatora/yandexdriver', options=options)
|
||||
webdriver.implicitly_wait(2)
|
||||
yield webdriver
|
||||
allure.attach(webdriver.current_url, "last url", allure.attachment_type.URI_LIST)
|
||||
webdriver.quit()
|
||||
@@ -24,13 +23,13 @@ def driver():
|
||||
def pytest_addoption(parser):
|
||||
"""Command line parser."""
|
||||
parser.addoption(f'--{Config.BASE_URL}',
|
||||
default='https://go.mail.ru/',
|
||||
default='https://s57.ivazh.ru/styles/r14/#12.13/71.2832/72.13405',
|
||||
dest=Config.BASE_URL,
|
||||
action='store',
|
||||
metavar='str',
|
||||
help='Environment for run tests.')
|
||||
parser.addoption(f'--{Config.STAGING}',
|
||||
default='go.mail.ru',
|
||||
default='s57.ivazh.ru',
|
||||
dest=Config.STAGING,
|
||||
action='store',
|
||||
metavar='str',
|
||||
|
||||
Reference in New Issue
Block a user