
# https://www.globalsino.com/ICs/page4853.html
# Open webpage using webdriver

from selenium import webdriver
import time

MyWebDriver = webdriver.Chrome(r'C:\usr\local\bin\chromedriver')
MyWebDriver.get('https://workspace.google.com/features/?utm_source=formsforwork&utm_medium=et&utm_content=hero&hl=en')
# Result 1

time.sleep(2)

# Clicks for answering to multiple choices and submission 
MySelection_of_MultiChoices = MyWebDriver.find_element_by_xpath('//*[@id="main"]/section[1]/article/div/div[1]/div/div/div/a')
MySelection_of_MultiChoices.click()
# Result 2

# Fill in 1
MyInput = "Yougui Liao"
# Paste xpath here
Last = MyWebDriver.find_element_by_xpath('//*[@id="c2"]')
Last.send_keys(MyInput)

# Clicks for answering to multiple choices and submission 
MySelection_of_MultiChoices2 = MyWebDriver.find_element_by_xpath('//*[@id="c3"]')
MySelection_of_MultiChoices2.click()

time.sleep(2)

# Clicks for answering to multiple choices and submission 
MySelection_of_MultiChoices2 = MyWebDriver.find_element_by_xpath('//*[@id="yDmH0d"]/c-wiz/div/div/div[2]/main/div/div/nav/div[1]/div/button/span/div')
MySelection_of_MultiChoices2.click()

# Result 3

MyFirstName = "Yougui"
# Paste xpath here
MyFirstN = MyWebDriver.find_element_by_xpath('//*[@id="c17"]')
MyFirstN.send_keys(MyFirstName)

MyLastName = "Liao"
# Paste xpath here
MyLastN = MyWebDriver.find_element_by_xpath('//*[@id="c19"]')
MyLastN.send_keys(MyLastName)

MyeMail = "yougui.liao@gmail.com"
# Paste xpath here
MyeM = MyWebDriver.find_element_by_xpath('//*[@id="c21"]')
MyeM.send_keys(MyeMail)

time.sleep(2)

# Clicks submission 
MySubmission2 = MyWebDriver.find_element_by_xpath('//*[@id="yDmH0d"]/c-wiz/div/div/div[2]/main/div/div/nav/div[1]/div/button/span/div')
MySubmission2.click()






