zoukankan      html  css  js  c++  java
  • python+selenium环境搭建

    一、python安装:
    下载安装python,安装目录为:E:AutoPython27


    二、pip安装:
    进入E:AutoPython27Scripts,点击easy_install-2.7.exe与pip2.7.exe


    三、环境变量配置:
    path中添加E:AutoPython27;E:AutoPython27Scripts


    四、检查python与pip环境配置:
    cmd框中输入:python与pip检查环境变量是否配置成功


    五、selenium安装:
    使用pip安装selenium,pip install selenium


    六、检查selenium的安装是否成功:
    cmd---》python---》from selenium import webdriver等等


    七、报告的生成:
    下载HTMLTestRunner.py放入到E:AutoPython27Libsite-packages目录下


    八、使用IE进行测试:
    1)下载IEDriverServer.exe(http://www.seleniumhq.org/download/)并放入到E:AutoPython27目录下
    2)注意点:由于IE浏览器涉及到安全保护问题,因此要将保护模式全部去掉,操作方式:设
    置- -》internet options---》security--》Lnternet / Local intranet / Trusted sites / Restric
    ted sites---》分别去掉Enable Protected Mode前面的打钩
    3)谷歌驱动32位:http://chromedriver.storage.googleapis.com/index.html


    九、使用谷歌、火狐进行测试,不需要安装浏览器驱动,直接下载安装geckodriver
    下载路径为:https://github.com/mozilla/geckodriver/releases
    使用方法:将下载的geckodriver.exe放置到安装firefox路径下,如(C:Program Files (x86)Mozilla Firefox)

  • 相关阅读:
    LeetCode 264. Ugly Number II
    LeetCode 231. Power of Two
    LeetCode 263. Ugly Number
    LeetCode 136. Single Number
    LeetCode 69. Sqrt(x)
    LeetCode 66. Plus One
    LeetCode 70. Climbing Stairs
    LeetCode 628. Maximum Product of Three Numbers
    Leetcode 13. Roman to Integer
    大二暑假周进度报告03
  • 原文地址:https://www.cnblogs.com/syw20170419/p/6737127.html
Copyright © 2011-2022 走看看