testing_code
testing_code
driver = webdriver.Chrome()
driver.get("http://localhost:3000")
time.sleep(5)
# Click Signup
driver.find_element(By.ID, "signup").click()
time.sleep(5)
# Signup First
# Wait for input fields to load and interact with them
driver.find_element(By.NAME, "firstName").send_keys("Mr")
driver.find_element(By.NAME, "lastName").send_keys("John")
driver.find_element(By.NAME,
"email").send_keys("[email protected]")
driver.find_element(By.NAME, "password").send_keys("12345")
driver.find_element(By.NAME,
"confirmPassword").send_keys("12345")
driver.get("http://localhost:3000/login")
time.sleep(5)
# Login
driver.find_element(By.NAME,
"email").send_keys("[email protected]")
time.sleep(1)
driver.find_element(By.NAME, "password").send_keys("12345")
time.sleep(1)
# Login
driver.find_element(By.NAME,
"email").send_keys("[email protected]")
time.sleep(1)
driver.find_element(By.NAME, "password").send_keys("12345")
time.sleep(1)
# crate a post
driver.find_element(By.NAME, 'post').send_keys('Beautiful new
post')
time.sleep(1)
driver.find_element(By.ID, 'publish-now').click()
time.sleep(2)