diff --git a/AutomationScripts/Autofill Google Forms/Images/1.png b/AutomationScripts/Autofill Google Forms/Images/1.png new file mode 100644 index 000000000..1f232eacb Binary files /dev/null and b/AutomationScripts/Autofill Google Forms/Images/1.png differ diff --git a/AutomationScripts/Autofill Google Forms/Images/2.png b/AutomationScripts/Autofill Google Forms/Images/2.png new file mode 100644 index 000000000..2e0ae5e5c Binary files /dev/null and b/AutomationScripts/Autofill Google Forms/Images/2.png differ diff --git a/AutomationScripts/Autofill Google Forms/Images/3.png b/AutomationScripts/Autofill Google Forms/Images/3.png new file mode 100644 index 000000000..a57847c11 Binary files /dev/null and b/AutomationScripts/Autofill Google Forms/Images/3.png differ diff --git a/AutomationScripts/Autofill Google Forms/README.md b/AutomationScripts/Autofill Google Forms/README.md new file mode 100644 index 000000000..e219201f0 --- /dev/null +++ b/AutomationScripts/Autofill Google Forms/README.md @@ -0,0 +1,36 @@ +# ✔ AUTOFILL GOOGLE FORM +- ### We will look at Web Automation using Python in detail. We will be using the Webdriver and Selenium Libraries to do our coding, and we will be filling out an attendance form. +- ### Auto fill in your form using your saved information. +- ### This will Reduce your time in filling the form. + +**** + +# REQUIREMENTS : +- ### python 3 +- ### Selenium +- ### Webdriver + +**** +# SCREENSHOTS : +**** + +

+
+

After 3 sec the form will be filled automatically

+
+

Google form will be also Submit automatically

+
+ +

+ +# Purpose : +- ### This scripts helps user to easily to fill Form automatically. + +# Compilation Steps : +- ### Install Selenium, Webdriver, webbrowser. +- ### Note that this script works only on chrome broweser v-93 +- ### You can change code according to your need +**** + +# Name : +- ### Aditya Gupta diff --git a/AutomationScripts/Autofill Google Forms/autofill_google_form.py b/AutomationScripts/Autofill Google Forms/autofill_google_form.py new file mode 100644 index 000000000..f26f462d9 --- /dev/null +++ b/AutomationScripts/Autofill Google Forms/autofill_google_form.py @@ -0,0 +1,28 @@ +from selenium import webdriver +import time + +web = webdriver.Chrome() +web.get('https://docs.google.com/forms/d/e/1FAIpQLSek4lvyKCkjeKHJwRRSUdsNb4WCIohFNlog7YjeWVzmEr3DQQ/viewform') + +time.sleep(3) + +LastName = "Aditya" +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') +last.send_keys(LastName) + +FirstName = "Gupta" +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') +first.send_keys(FirstName) + +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') +RadioButtonPeriod.click() + +Submit = web.find_element_by_xpath('//*[@id="mG61Hd"]/div[2]/div/div[3]/div[1]/div/div/span') +Submit.click() + +get_confirmation_div_text = web.find_element_by_css_selector('.freebirdFormviewerViewResponseConfirmationMessage') +print(get_confirmation_div_text.text) +if ((get_confirmation_div_text.text) == "Thank you for attending"): + print ("Test Was Successful") +else: + print("Test Was Not Successful")

AltStyle によって変換されたページ (->オリジナル) /