Navigate to filegarden.com

This commit is contained in:
The Magician 2023-10-19 21:34:17 +01:00
parent 2efa292117
commit 4ff0f60ca4
2 changed files with 16 additions and 4 deletions

View File

@ -5,10 +5,12 @@ from selenium import webdriver
def initialize_webdriver():
return webdriver.Firefox()
def navigate_to_filegarden(browser):
browser.get("https://filegarden.com")
def main():
driver = initialize_webdriver()
# Open browser
# Navigate to filegarden
browser = initialize_webdriver()
navigate_to_filegarden(browser)
# Go To Your Garden
# Log in (email)
# Go To Your Garden

View File

@ -12,11 +12,21 @@ class TestJardin(unittest.TestCase):
mockFirefox.assert_called_once()
@patch("selenium.webdriver.Firefox")
def test_navigate_to_filegarden(self, mockFirefox):
jardin.navigate_to_filegarden(mockFirefox)
mockFirefox.get.assert_called_once_with("https://filegarden.com")
@patch("jardin.initialize_webdriver")
def test_main_calls_initialize_webdriver(self, mockInitializeWebdriver):
@patch("jardin.navigate_to_filegarden")
def test_main_calls_methods_in_correct_order(self,
mockInitializeWebdriver,
mockNavigateToFilegarden):
jardin.main()
mockInitializeWebdriver.assert_called_once()
mockNavigateToFilegarden.assert_called_once()
if __name__ == "__main__":
unittest.main()