Install Robot Framework on Linux Fedora20 or ubuntu /on Mac /on windows

本文提供了在Linux、MacOSX及Windows环境下安装RobotFramework及其相关组件的详细步骤。涵盖Python环境搭建、安装RobotFramework核心库、IDE及各类常用库如Selenium、Database、SSH等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Install Robot Framework on Linux


Step
Description
How to
Note
0Install Python

sudo apt-get install python

fedora:yum install python

 

If not yet installed

fedora: yum list python  /* can view which python version will be installed */

1Install easy_install

sudo apt-get install python-setuptools

or:

sudo yum install python-setuptools

 
2Install Pipeasy_install pip 
3Install Robot Frameworkpip install robotframeworkRun test case by execute "pybot [testcase.robot]" in terminal
4Install Robot Framework IDEpip install robotframework-rideStart RIDE by execute ride.py in terminal
5Install Selenium Librarypip install robotframework-selenium2library 
6Install Database Librarypip install robotframework-databaselibrary 
7Install SSH Librarypip install robotframework-sshlibrary

If fail to install sshlibrary, install paramiko and pycrypto seperately:

pip install paramiko

pip install pycrypto

 

If above fails to install pycrypto, use yum or apt-get to install python-crypto package. I will put this note to a wiki page.

Fedrora: #yum install python-crypto

Other: #apt-get install python-crypto

8Install wxPython-2.8.12.1

apt-get install python-wxgtk2.8

fedora: yum install wxPython

soucre code download list

http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/

 

wxPython version 2.8.10.0 or newer with Unicode support is required for RIDE to work

 

 

Install Robot Framework on MacOSX


Step
Description
How to
Note
0Install XcodeDownload and Install Xcode through Apple App StoreIt is absolutely critical that gcc and the OS X command line tools are installed before beginning the installation process.
1Install easy_installcurl -O https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py
 
2Install Pipeasy_install pip 
3Install Robot Frameworkpip install robotframework 
4Install Robot Framework IDEpip install robotframework-ride 
5Install Selenium Librarypip install robotframework-selenium2library 
6Install Database Librarypip install robotframework-databaselibrary 
7Install SSH Librarypip install robotframework-sshlibrary

It is absolutely critical that gcc and the OS X command line tools are installed before beginning the installation process. Trying to build and install  paramiko and pycrypto will fail with a variety of errors ranging from “autoconf error” to “ImportError: No module named Crypto” – if you encounter either of those errors it’s because Xcode’s command line tools are not installed yet.

 

If fail to install sshlibrary, install paramiko and pycrypto independently:

pip install paramiko

pip install pycrypto

 

If above fails. Install PyCrypto as follow:

#curl -O https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz

#tar xvfz pycrypto-2.6.1.tar.gz

#cd to pycrypto.2.6.1

#python setup.py build

#python setup.py install

8Install wxPython-2.8.12.1download and install http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7.dmg/download

wxPython version 2.8.6 or newer with Unicode support is required for RIDE to work.

This installer is not signed by Apple, so by default your Mac will tell you it is corrupted and will not install it. You can get around this by temporarily relaxing the security settings in System Preferences. In the Security & Privacy section set "Allow applications downloaded from" to "Anywhere."

9Create a ride.sh file
#!/bin/bash
export VERSIONER_PYTHON_PREFER_32_BIT=yes
 
python /Library/Python/ 2.7 /site-packages/robotframework_ride- 1.3 -py2. 7 .egg/EGG-INFO/scripts/ride.py

In MacOS, RIDE required 32bit Python. This step runs Python in 32bit.

If run into problem when execute ride.sh, make sure the path to ride.py is correct. Path check as following:

    $ which ride.py

    /usr/local/bin/ride.py

 

Install Robot Framework on Windows


StepDescriptionHow toNote
0Install Python

Download and install from: https://www.python.org/ftp/python/2.7.9/python-2.7.9.msi 

Restart your system

Make sure "C:\Python27" is added to path under Windows Environment Variables
1Install easy_install

Download from: https://bootstrap.pypa.io/ez_setup.py

Double click ez_setup.py to install

Make sure "C:\Python27\Scripts" is added to path under Windows Environment Variables
Note: All "easy_install" and "pip" is executed in cmd
2Install Pipeasy_install pip 
3Install Robot Frameworkpip install robotframeworkRun testcase in cmd by: ...>pybot [testcase.robot]
4Install Robot Framework IDE

Download and install wxPython: http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/wxPython2.8-win32-unicode-2.8.12.1-py27.exe/download

pip install robotframework-ride

Need to install wxPython before running RIDE. wxPython version 2.8.6 or newer with Unicode support is required for RIDE to work.

Start RIDE in cmd by: ...>ride

5Install Selenium Librarypip install robotframework-selenium2library 
6Install Database Librarypip install robotframework-databaselibrary 
7Install SSH Library

Download and Install Visual C++ for Python: http://aka.ms/vcpython27

pip install robotframework-sshlibrary

If fail to install sshlibrary, install paramiko and pycrypto independently:

pip install paramiko

pip install pycrypto

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

youcharming

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值