Commit d3ea6bea authored by dennisjl's avatar dennisjl
Browse files

Adds skeleton for seleniumtest for dark mode

parent 95f189dd
Pipeline #73813 passed with stage
in 1 minute and 1 second
import unittest
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
class AgreelanceDarkMode(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Chrome("C:/bin/chromedriver.exe")
def test_dark_mode_toggle(self):
driver = self.driver
driver.get("http://127.0.0.1:8000/")
self.assertNotIn(driver.find_element_by_class_name("custom-control-label"), driver.find_elements_by_class_name("navbar navbar-expand-lg navbar-light bg-light"))
"""toggler = driver.find_elements_by_class_name("navbar-toggler")
toggler.click()
time.sleep(1)
darkmode_click = driver.find_element_by_class_name("custom-control-label")
darkmode_click.click()
#assert "No results found." not in driver.page_source
"""
def tearDown(self):
self.driver.close()
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment