werefox-cafe/tests/test_suite/footer_test.py

28 lines
942 B
Python
Raw Normal View History

#!/usr/bin/python
# Necessary imports
from selenium.webdriver.common.by import By
from robot.api.logger import error
def grab_button_elements(driver):
# Try to grab button elements of the footer
try:
footer_element = driver.find_element(By.TAG_NAME, "footer")
sites = footer_element.find_elements(
By.XPATH, ".//a")
except:
error("Couldn't find the element.")
driver.close()
driver.quit()
return {}
return sites
def load_data():
# I don't have a better method of constructing the data dict
data = {"Contact": {"url": "https://info.werefox.cafe/contacts"}, " /src": {"url": "https://gitea.werefox.cafe/ada/werefox-cafe"}, "Mutant Standard emoji": {
"url": "https://mutant.tech"}, "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License": {"url": "https://creativecommons.org/licenses/by-nc-sa/4.0/"}}
return data