python automated testing of selenium (a)

Why conduct a test automation

  • Shorten test cycles
  • To avoid human error
  • Test information storage
  • Easily obtain coverage

Two web / ui automation conditions and scope of application

  • Manual testing has been completed, the latter without affecting the progress of the gradual automation
  • Project cycle is long, repetitive work to the machines to achieve
  • Demand is stable, little change project
  • Automated test scripts complexity relatively low block
  • Reusable

Download and install Chrome three drives, Chromedriver

Check your browser version Chrome-> Help, then in Taobao NPM http://npm.taobao.org/ download the corresponding version of ChromeDriver mirror,

 

 After the download, unzip the file in the same directory in python installation directory (where python entered in cmd to see the python installation directory)

 

 Four installation selenium

Enter pip install selenium directly in Terminal

Or file-> settings-> Project-> Project Interpreter-> Click +, enter selenium

 

 

 

 If the download speed is slow, you can replace the link in the Manage Repositories to https://pypi.douban.com/simple

Chrome installed ChroPath precise positioning elements may be used xpath

 

Guess you like

Origin www.cnblogs.com/ella-li/p/11582324.html