Gmail Automation With Selenium Python
- fredrickwer9
- Dec 29, 2018
- 1 min read
Quick dive on Gmail access automation with selenium
Step 1 :
Download selenium webdriver (latest version version 3.141.59)
Download-path: >> https://www.seleniumhq.org/download/
STEP 2:
Set up path & webbrowser (Chrome)
web_setup.py
import time import selenium from selenium import webdriver
def web_testing():
# driver = webdriver.Chrome('"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"' ) s = r'C:\Users\customer\AppData\Local\Temp\Rar$EXa6940.47898\chromedriver.exe' driver = webdriver.Chrome(s) driver.get('http://www.google.com/xhtml'); time.sleep(5) search_box = driver.find_element_by_name('q') search_box.send_keys('ChromeDriver') search_box.submit() time.sleep(5) # Let the user actually see something! driver.quit()
if __name__ == "__main__": web_testing()
get entire scripts in the links below!
https://github.com/olobamangidi/pythongmail-auto-login/blob/master/gmail-test-selenium-signin.py
https://github.com/olobamangidi/pythongmail-auto-login/blob/master/webdriver-setup.py
Comments