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

相关文章:

  • 2021-09-11
  • 2022-01-13
  • 2022-01-25
  • 2021-06-26
  • 2021-12-28
  • 2022-12-23
  • 2021-11-27
猜你喜欢
  • 2021-07-18
  • 2021-07-07
  • 2021-11-19
  • 2022-12-23
  • 2021-10-27
  • 2021-06-26
  • 2021-10-02
相关资源
相似解决方案