-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.py
38 lines (27 loc) · 1.04 KB
/
signup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import os
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
# Start the Chrome WebDriver
driver = webdriver.Chrome()
# Open the web page
driver.get("http://localhost:3000")
# Wait for the page to load
driver.implicitly_wait(10)
# Click on the signup tab
signup_tab = driver.find_element("id","signupTesting")
signup_tab.click()
# Find input fields
name_field = driver.find_element("id","name")
email_field = driver.find_element("id","email")
password_field = driver.find_element("id","password")
contact_field = driver.find_element("id","contact")
# Fill in signup form fields
name_field.send_keys("TestUser")
email_field.send_keys("[email protected]")
password_field.send_keys("AsDr1234!")
contact_field.send_keys("1234567890")
WebDriverWait(driver, 100).until(EC.element_to_be_clickable(('id', 'signupTesting')))
print("Signup test performing!")
input("Press Enter to close the browser window.")