Steps to setup Python+Selenium environment

Steps to setup Python+Selenium environment

  1. Download latest Python 3 version from https://www.python.orgversion
  2. Choose create env path automatically during install process ,after install successfully run Python command would show the python version
    Steps to setup Python+Selenium environment
  3. Use Third-party libraries to install selenium
    Steps to setup Python+Selenium environment
  4. Use Chrome for automation, check local chrome version and download corresponding chromedriver.exe from
    http://npm.taobao.org/mirrors/chromedriver/
    Steps to setup Python+Selenium environment
  5. Download and Extra the zip file, put the chromedriver.exe to python.exe folder
    Steps to setup Python+Selenium environment
  6. Install Python IDE Pycharm , new python file to start your automation
    Check project interpreter make sure your env have already install selenium
    Steps to setup Python+Selenium environment
  7. Eg automation scrip

# coding=utf-8
from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.get(“URL”)
driver.find_element_by_xpath("//input[@id=‘XXX’]").send_keys(“XXX”)
driver.find_element_by_xpath("//input[@id=‘XXX’]").send_keys(‘XXX’)
time.sleep(3)
driver.find_element_by_xpath("//input[@name=‘submitForm’]").click()

Steps to setup Python+Selenium environment