首页 > 代码库 > <转>准备Eclips+python+robot framework环境

<转>准备Eclips+python+robot framework环境

关于python:
path添加:C:\Python27;C:\Python27\Scripts;
新加一项:  PYTHON_HOME    C:\Python27
再不行的话,加一个用户变量: PYTHONPATH   C:\Python27\
 
注: Python27有utf8编码的bug,http://bugs.python.org/file18143/9291.patch 
按这个patch改下就行
关于java
Path中添加:C:\Program Files\Java\jre7\bin
添加两项:
 CLASS_PATH  C:\Program Files\Java\jre7\lib
 JAVA_HOME    C:\Program Files\Java\jdk1.7.0_51
 
Robot环境:
1. robotframework(2.8.4): https://pypi.python.org/pypi/robotframework/
2. ride下载目录:https://pypi.python.org/pypi/robotframework-ride 
ride1.3目前只依赖wxpython2.8.12.1,不要安装3.0:http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/    
robot库下载:
3. selenium2library:https://pypi.python.org/simple/robotframework-selenium2library/
或者: C:\Python27\Scripts\easy_install.exe   robotframework-selenium2library
 
4. autoit 和pythonwin32 
安装autoit之前先安装pythonwin32(activepython里面也有),Python操作windows需要win32com模块。
pythonwin32:http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/
autoit: https://code.google.com/p/robotframework-autoitlibrary/ 
注意:autoit这个lib库,自带的是32位的库文件,需要替换AutoItLibrary-1.1\3rdPartyTools\AutoIt\AutoItX3.dll成相应的这个dll
找不到相应的dll,可以安装autoit,然后拷贝出来。
 
4. pip安装: python  get-pip.py
  # Install the latest version
    pip install robotframework    easy_install robotframework    # Upgrade to the latest version    pip install --upgrade robotframework    easy_install --upgrade robotframework    # Install a specific version    pip install robotframework==2.7.1    easy_install robotframework==2.7.1    # Uninstall -- only supported by pip    pip uninstall robotframework

 

Selenium2library怎么用pip安装:
https://github.com/rtomac/robotframework-selenium2library

<转>准备Eclips+python+robot framework环境