ok. Iam trying to autofill google sign.in page using python and selenium. but, im having two problems.
- I would like to know if its possible to fill already opened page in the browser instead of opening a new page and filling it.
- Whenever im trying to fill the page using the code below, it fills the username but then the browser shows a error saying that
couldn't sign in you because the browser or app may not be secure
. How to fix this!!
question from:https://stackoverflow.com/questions/65847157/problem-regarding-automation-using-pythonfrom selenium import webdriver import time from selenium.webdriver.common.keys import Keys chromedriver = 'd:Drivers\chromedriver.exe' browser = webdriver.Chrome(chromedriver) browser.get('https://accounts.google.com/ServiceLogin/identifier?flowName=GlifWebSignIn&flowEntry=AddSession') args: ['--disable-web-security', '--user-data-dir', '--allow-running-insecure-content' ] username = browser.find_element_by_xpath('//*[@id="identifierId"]') username.send_keys("") browser.find_element_by_xpath('//*[@id="identifierNext"]/div/button/div[2]').click() time.sleep(3) password = browser.find_element_by_xpath('//*[@id="password"]/div[1]/div/div[1]/input') password.send_keys(" ") browser.find_element_by_xpath('/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[2]/div/div[1]/div/div/button/div[2]').click()