werefox-cafe/tests/test_suite/root_domain_test.py

33 lines
857 B
Python
Raw Normal View History

#!/usr/bin/python
# Necessary imports
from robot.api.logger import info
from shared_methods import load_data, check_buttons
import footer_test
def execute_tests(driver, site_url):
filepaths = ['/data/homepage/subdomains.yml', '/data/homepage/other.yml']
data = load_data(filepaths)
# Load requested site
info('Attempting to get page...')
driver.get(site_url)
info('Page loaded.')
info('Attempting to click through subdomain buttons...')
# Check all the buttons work
if (not check_buttons(driver, data)):
info('Test failed.')
return False
# A little bit of setup, grabbing the button elements
data = footer_test.load_data()
# Check the footer buttons
if (not check_buttons(driver, data)):
info('Test failed.')
return False
info('Test succeeded.')
return True