2021-12-03 09:08:45 +08:00
|
|
|
import pytest
|
|
|
|
from selenium import webdriver
|
|
|
|
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def URL():
|
|
|
|
return 'http://127.0.0.1:5000' # URL of the program
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def driver():
|
2024-04-09 22:09:50 +08:00
|
|
|
my_driver = webdriver.Edge() # uncomment this line if you wish to run the test on your laptop
|
2021-12-03 09:08:45 +08:00
|
|
|
return my_driver
|
2024-04-09 22:09:50 +08:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def UNAME():
|
|
|
|
return 'lanhui'
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def PASSWORD():
|
|
|
|
return 'l0ve1t'
|