RobotFramework环境部署

1.安装Python 2.7,修改环境变量。由于版本问题,Python 3.0安装如果出现问题,需要另外解决

2.settools安装

   settools下载路径:https://pypi.python.org/pypi/setuptools

   settools安装方法:settools路径>python setup.py install

3.pip安装

  只需要记得请将C:\Python27\Scripts添加到系统环境变量Path后面

  重启电脑,cmd输入pip,有返回

  python -m pip install --upgrade pip    #########更新pip版本

4.Robot Framework安装
  pip install robotframwork

5.wxPython安装  #########GUI 库,因为 RIDE 是基于这个库开发的,所以这个必须安装。

  pip install -U wxPython     

6.robotframework -ride安装   #########图形编辑器

  pip install robotframework-ride

7.ride编辑器启动

  ride路径》python ride.py    

  提示:wxPython版本不对时,进入下面路径下载对应的版本:http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/    

  桌面启动脚本:python -c "from robotide import main; main()"    ######后缀为.bat的脚本

8.web自动化需要加载Selenium2Library库

   安装:pip install robotframework-selenium2library

  导入:1.新建test suite 点击【Library】2.输入Selenium2Library进行导入  3.按F5查看是否成功导入此库

9.浏览器驱动的安装到C:\Python27根目录下

  驱动下载网址:

  

    1. Mozilla GeckoDriver(Firefox) 
      https://github.com/mozilla/geckodriver/releases

    2. Google Chrome Driver 
      https://sites.google.com/a/chromium.org/chromedriver/ 
      https://chromedriver.storage.googleapis.com/index.html?path=2.28/

    3. Microsoft Edge Driver(IE) 
      https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

  

 

  

猜你喜欢

转载自www.cnblogs.com/gracewei/p/9228814.html