I\'m trying to run a script in Selenium/Python that requires logins at different points before the rest of the script can run. Is there any way for me to tell the script to
from selenium import webdriver
import getpass # < -- IMPORT THIS
def loginUser():
# Open your browser, and point it to the login page
someVariable = getpass.getpass("Press Enter after You are done logging in") #< THIS IS THE SECOND PART
#Here is where you put the rest of the code you want to execute
THEN whenever you want to run the script, you type loginUser() and it does its thing
this works because getpass.getpass() works exactly like input(), except it doesnt show any characthers ( its for accepting passwords and notshowing it to everyone looking at the screen)
So what happens is your page loads up. then everything stops, Your user manually logs in, and then goes back to the python CLI and hits enter.