Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @pytest.fixture(scope='session')
- def app(request):
- fixture = Application()
- browser.open_url(home_url)
- request.addfinalizer(fixture.destroy)
- return fixture
- class Application:
- def __init__(self):
- self.test = Test(self)
- self.test1 = Test1(self)
- class Test:
- def __init__(self, app):
- self.app = app
- def open_page(self):
- browser.find_element_by_css(x)
- class Test1:
- def __init__(self, app):
- self.app = app
- def open_page1(self):
- browser.find_element_by_css(y)
- def test1(app):
- app.test.open_page()
- def test2(app):
- app.test1.open_page1()
Add Comment
Please, Sign In to add comment