└── automation.py /automation.py: -------------------------------------------------------------------------------- 1 | from selenium import webdriver 2 | import time 3 | 4 | web = webdriver.Chrome() 5 | web.get('https://docs.google.com/forms/d/e/1FAIpQLSek4lvyKCkjeKHJwRRSUdsNb4WCIohFNlog7YjeWVzmEr3DQQ/viewform') 6 | 7 | time.sleep(2) 8 | 9 | LastName = "Kattimani" 10 | last = web.find_element_by_xpath('//*[@id="mG61Hd"]/div[2]/div/div[2]/div[1]/div/div/div[2]/div/div[1]/div/div[1]/input') 11 | last.send_keys(LastName) 12 | 13 | FirstName = "Rishab" 14 | first = web.find_element_by_xpath('//*[@id="mG61Hd"]/div[2]/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div/div[1]/input') 15 | first.send_keys(FirstName) 16 | 17 | RadioButtonPeriod = web.find_element_by_xpath('//*[@id="mG61Hd"]/div[2]/div/div[2]/div[3]/div/div/div[2]/div[1]/div/span/div/div[2]/label/div/div[1]/div/div[3]/div') 18 | RadioButtonPeriod.click() 19 | 20 | Submit = web.find_element_by_xpath('//*[@id="mG61Hd"]/div[2]/div/div[3]/div[1]/div/div/span') 21 | Submit.click() 22 | 23 | get_confirmation_div_text = web.find_element_by_css_selector('.freebirdFormviewerViewResponseConfirmationMessage') 24 | print(get_confirmation_div_text.text) 25 | if ((get_confirmation_div_text.text) == "Thank you for attending"): 26 | print ("Test Was Successful") 27 | else: 28 | print("Test Was Not Successful") 29 | --------------------------------------------------------------------------------