-
-
Notifications
You must be signed in to change notification settings - Fork 264
AutoFill Google Forms #986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
AutomationScripts/Autofill Google Forms/Images/1.png
Binary file added
AutomationScripts/Autofill Google Forms/Images/2.png
Binary file added
AutomationScripts/Autofill Google Forms/Images/3.png
36 changes: 36 additions & 0 deletions
AutomationScripts/Autofill Google Forms/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 : | ||
**** | ||
|
||
<p align="center"> | ||
<img width = 1000 src="Images/1.png" /><br> | ||
<p>After 3 sec the form will be filled automatically</p> | ||
<img width = 1000 src="Images/2.png" /><br> | ||
<p>Google form will be also Submit automatically</p> | ||
<img width = 1000 src="Images/3.png" /><br> | ||
|
||
</p> | ||
|
||
# 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 |
28 changes: 28 additions & 0 deletions
AutomationScripts/Autofill Google Forms/autofill_google_form.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.