I made it to sleep for 50 second and didnt work , I keep getting the old screen and I getting element isn't located because the screen keeps showing the old one , i tried to host on Heroku and It works perfectly
Here's my code
def logIn_selenium(driver,us,pw):
driver.get("https://www.reddit.com/login")
sleep(50)
username = driver.find_element(By.XPATH,"//*[@id='loginUsername']")
username.send_keys(us)
password = driver.find_element(By.XPATH,"//*[@id='loginPassword']")
password.send_keys(pw)
password.send_keys(Keys.RETURN)
sleep(5)
try:
error = driver.find_element(By.CLASS_NAME,"AnimatedForm__errorMessage")
if error.text == "Incorrect username or password":
driver.quit()
return "Incorrect username or password"
except:
pass
return driver
if u noticed that im only typing username and password for the new reddit screen but selenium shows my old screen with a third input which is 2FA code ,while my account on reddit no 2FA is enabled