Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pytest
- from lib import public
- from lib import environment
- from pages import login
- from pages import performance
- def setup_module(module):
- # grab the config
- public.config = environment.load_config()
- # store these to help readability below
- public.user = public.config['account']['user']
- public.password = public.config['account']['password']
- # pub url
- public.hub_url = public.config['hub']['url']
- # start the driver
- public.driver = environment.init_driver(public.config)
- #login to hub
- lg = login.LoginPage(public)
- lg.login(public.user, public.password)
- def teardown_module(module):
- # throw away the driver
- public.driver.quit()
- @pytest.mark.keyflow
- def test_date_picker():
- #click on performance button to open performance page
- pm = performance.PerformancePage(public)
- pm.click_performancebutton()
- pm.click_datepicker()
- pm.click_thisyear()
- pm.click_apply()
- @pytest.mark.keyflow
- def test_merchant_report():
- #Test Merchant report
- pm = performance.PerformancePage(public)
- pm.click_merchant()
- pm.check_page_loaded()
- @pytest.mark.keyflow
- def test_merchant_mousehoverpages():
- #test merchant report mouse hover pages icon
- pm = performance.PerformancePage(public)
- pm.merchant_pages_mousehover()
- @pytest.mark.keyflow
- def test_merchant_mousehoverpagessehoverproduct():
- #test merchant report mouse hover pages icon
- pm = performance.PerformancePage(public)
- pm.merchant_product_mousehover()
- @pytest.mark.keyflow
- def test_pages_revenue_report():
- #test pages by revenue report
- pm = performance.PerformancePage(public)
- pm.click_pages()
- pm.check_page_loaded_pages()
- pm.check_page_loaded_pagestabs()
- @pytest.mark.nokeyflow
- def test_pages_mousehoverproduct():
- #test pages report mouse hover product icon
- pm = performance.PerformancePage(public)
- pm.pages_product_mousehover()
- @pytest.mark.keyflow
- def test_pages_activity_report():
- #test pages by activity report
- pm = performance.PerformancePage(public)
- pm.click_pages_by_activity()
- pm.check_page_loaded_pagestabs()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement