|
@@ -1,30 +1,28 @@
|
|
|
-
|
|
|
-import time
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
from selenium import webdriver
|
|
|
-from selenium.webdriver.common.by import By
|
|
|
from selenium.webdriver.common.keys import Keys
|
|
|
|
|
|
-
|
|
|
-test_scenario = "Login Test for Application"
|
|
|
+
|
|
|
+test_scenario = "Login Test for <Application Name>"
|
|
|
|
|
|
-
|
|
|
+
|
|
|
driver = webdriver.Chrome()
|
|
|
|
|
|
-
|
|
|
+
|
|
|
driver.get("http://example.com/login")
|
|
|
|
|
|
-
|
|
|
-username_field = driver.find_element(By.ID, "username")
|
|
|
+
|
|
|
+username_field = driver.find_element_by_id("username")
|
|
|
username_field.send_keys("test_user")
|
|
|
|
|
|
-password_field = driver.find_element(By.ID, "password")
|
|
|
+password_field = driver.find_element_by_id("password")
|
|
|
password_field.send_keys("test_password")
|
|
|
|
|
|
-login_button = driver.find_element(By.ID, "loginButton")
|
|
|
+login_button = driver.find_element_by_id("loginButton")
|
|
|
login_button.click()
|
|
|
|
|
|
-
|
|
|
-print(f"Test completed at: {time.strftime('%Y-%m-%d %H:%M:%S')}")
|
|
|
-
|
|
|
-
|
|
|
-driver.quit()
|
|
|
+
|
|
|
+import datetime
|
|
|
+print(f"Completion Time: {datetime.datetime.now()}")
|