• 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)

  • 相关阅读:
    软件工程课程建议
    结对编程2
    结对编程---《四则运算》
    AVAudioPlayer播放音乐
    《问吧》需求分析
    有关结对编程的感想
    UItabBarController
    ViewController 视图控制器的常用方法
    <问吧>调查问卷心得体会
    UINavigationController导航控制器
  • 原文地址:https://www.cnblogs.com/syw20170419/p/6737127.html
Copyright © 2020-2023  润新知