I am attempting to create a script in which I sign in to a website with my google account, but I am having a major issue which I can't get my head around.
import selenium
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
import time
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome("/Users/vagif/Downloads/chromedriver")
driver.get('https://passport.alibaba.com/icbu_login.htm?return_url=https%3A%2F%2Fwww.alibaba.com%2F')
driver.implicitly_wait(3)
google = driver.find_element_by_xpath('//a[@attr-type="google"]')
google.click()
time.sleep(1)
actions = ActionChains(driver)
actions.key_down(Keys.COMMAND + '~').perform()
time.sleep(1)
element = driver.find_element_by_xpath('//input[@type="email"]')
element.send_keys('leine.tee1@gmail.com')
time.sleep(1)
next = driver.find_element_by_class_name('RveJvd').click()
time.sleep(1)
password = driver.find_element_by_class_name('whsOnd').send_keys('***password***')
next = driver.find_element_by_class_name('RveJvd').click()
My problem is that the code works fine up until the sign in with google popup appears. After that, I receive an error saying that the element was not located. Any help would really be appreciated thank you all!