-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
27 lines (20 loc) · 701 Bytes
/
Copy pathconftest.py
File metadata and controls
27 lines (20 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import pytest
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
driver: webdriver.Remote
@pytest.fixture
def setup_teardown():
# setup
global driver
chrome_options = Options()
#chrome_options.add_argument('--headless') # para executar os testes em modo headless basta descomentar esta linha
chrome_options.add_argument('--no-sandbox')
#chrome_options.binary_location = '/usr/bin/google-chrome'
driver = webdriver.Chrome('/usr/bin/chromedriver', options=chrome_options)
driver.get("https://www.saucedemo.com/")
driver.maximize_window()
driver.implicitly_wait(5)
# run test
yield
# teardown
driver.quit()