Setup Robot Environment

Use python to call C# dll function
Environment prepare:

  1. Environment prepare: Close firewall, user control, system update

  2. Install java JDK and configure environment variables.
    Reference: http://jingyan.baidu.com/article/c85b7a6414f2ee003bac95d5.html

  3. Install python and configure environment variables, then install pip (need install 32bit Python)
    Download: https://www.python.org/downloads/
    Configure python environment variables: http://jingyan.baidu.com/article/48206aeafdcf2a216ad6b316.html (need to add both c:\python27 and c:\python27\scripts into path)
    Install pip command: easy_install pip (in CMD, need to change to python home/scripts path: cd C:\Python27\Scripts, then run this command)
    Reference: http://jingyan.baidu.com/article/e73e26c0d94e0524adb6a7ff.html

  4. Install IronPython (only has 32bit version, so python related tools need to install 32bit version)
    Download:
    http://ironpython.net/
    https://github.com/IronLanguages/main/releases/download/ipy-2.7.7/IronPython-2.7.7.msi
    Install pythonnet to avoid load dll error: pip install pythonnet (need to change to python home path: cd C:\Python, then run this command)

  5. Install wxPython: (should use 32bit version, use by Robot RIDE)
    a. pip install -U wxPython
    b. download link:
    https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/
    https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/wxPython2.8-win32-unicode-2.8.12.1-py27.exe/download

  6. Install Robot Framework and RIDE (2 ways)
    a: install via pip command (will install the latest version, but without desktop icon for RIDE, it’s more appropriate for Testing environment)
    Install command: pip install robotframework (https://pypi.python.org/pypi/robotframework)
    pip install robotframework-ride (https://github.com/robotframework/RIDE/wiki/Installation-Instructions#installing-from-source)
    open RIDE command: cmd C:\Python24\Python.exe C:\Python24\Scripts\ride.py

    b. Install via exe file (will have desktop icon for RIDE, it’s more appropriate for DEV environment )
    Download link:
    https://pypi.python.org/pypi/robotframework
    https://pypi.python.org/pypi/robotframework-ride

  7. For develop environment, also need to install Visual Studio and "Python Tools for Visual Studio"

  8. Put “clr.pyd” and “Python.Runtime.dll” under “C:\Python27\Lib\site-packages” (optional)

  9. Run “ride.py” in command line
    if it popup error like “getDefaultPublisher() -> Publisher: SyntaxError: Invalid syntax”,
    then please follow link “https://python-forum.io/Thread-WxPython-PyPubSUb-in-Python-2-7-Error”.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值