Jul-21-2022, 09:07 AM
Hello folks,
I am not an expert, yet :), in python but have one question for you?
Until a few days ago everything worked well regarding my python script but now I do not know how to verify my (Microsoft) account via text message.
Username and password passed and then it asks me to verify the account via text message code?
Is there some solution for this?
Thank you in advance.
Below is the piece of my code, but I guess this should be refined for text message verification.
I am not an expert, yet :), in python but have one question for you?
Until a few days ago everything worked well regarding my python script but now I do not know how to verify my (Microsoft) account via text message.
Username and password passed and then it asks me to verify the account via text message code?
Is there some solution for this?
Thank you in advance.
Below is the piece of my code, but I guess this should be refined for text message verification.
def login(driver): """ Login to microsoft services in this session so we can navigate to other pages freely """ # Open page to get authenticated driver.get('https://login.microsoftonline.com/') logging.info("Microsoft login page opened") time.sleep(15) # Find username/email input element username_input = driver.find_element_by_id("i0116") # Enter email and press enter username_input.send_keys(EMAIL) username_input.send_keys(Keys.ENTER) logging.info("Email entered to login form") time.sleep(15) # Get password field, enter pwd and press enter to log in password_input = driver.find_element_by_id("i0118") password_input.send_keys(PASSWORD) logging.info("Password entered to login form") password_input.send_keys(Keys.ENTER) logging.info("Form submitted") time.sleep(15)