Before and after the repeated loading and unloading took three days to install, this is a successful installation after the memory of writing, there may be omissions, some words please point out, thank you ~
System version: MacOS 10.12.2; Mac comes with Python 2.7.10
1. Install pip
inside the terminal sudo easy_install pip, run finish can use PIP Help test whether the installation is successful, then the installation is Pip (9.0.1)
cx-macbook-pro:~ cx$ sudo easy_install pipcx-macbook-pro:~ cx$ pip Help
(PS: When using sudo, you need to enter the password, this password is your own computer password)
2. Installing Robotframework
Terminal inside sudo pip install robotframework, run finish can use Pybot--version test whether the installation is successful.
There will be a robot folder under/library/python/2.7/site-packages/
cx-macbook-pro:~ cx$ sudo pip install robotframework
cx-macbook-pro:~ cx$ Pybot--versionrobot Framework 3.0.2 (Python 2.7.10 on Darwin)
(without sudo, will have the right to error)
3. Install robotframework-ride
terminal inside sudo pip install Robotframework-ride, run finish can be viewed with PIP list
cx-macbook-pro:~ cx$ sudo pip install robotframework-ride
cx-macbook-pro:~ cx$ pip List
4. Installing Wxpython
HTTP://SOURCEFORGE.NET/PROJECTS/WXPYTHON/FILES/WXPYTHON/2.8.12.1/
Download WXPYTHON2.8-OSX-UNICODE-2.8.12.1-UNIVERSAL-PY2.7.DMG, directly double-click the. PKG Error: Installation failed
Because the software that you want to install is not found
The correct installation method:
4.1 Download after double click Unzip,. PKG Click on the installation package, right-select: Show Package Contents
4.2 Open contents/resources/, double-click to unzip the file wxpython2.8-osx-unicode-universal-py2.7.pax.gz
4.3 Copy the usr/local lib file from the extracted file to the system usr/local (use Finder to go to folder, merge Lib file)
4.4 Copy the contents/resources below Postflight to the desktop, to the directory where the CD is postflight, run the command
cx-macbook-pro:~ cx$ cd/users/cx/desktopcx-macbook-pro:desktop cx$ sudo./postflight
4.5 Running ride.py, the Python driver is prompted to be 32 bits: Python should is executed in 32-bit mode with WxPython on OSX.
So you need to enforce the 32-bit
Cx-macbook-pro:desktop cx$ Defaults write Com.apple.versioner.python prefer-32-bit-bool Yes
PS: Do not install Wxpython with BREW/PIP because the installed version is 3.0.2.0 ride.py
5. Installing robotframework-selenium2library
terminal inside sudo pip install robotframework-selenium2library
cx-macbook-pro:~ cx$ sudo pip install robotframework-selenium2library
Terminal PIP List
Pip (9.0.1)
Robotframework (3.0.2)
Robotframework-ride (1.5.2.1)
Robotframework-selenium2library (1.8.0)
WxPython (2.8.12.1)
after installing the environment RFS , the terminal input starts the ride.py. Create a test case, create a test suite, and import selenium2library.
Browser Firefox (version 56.0 64 bit) when running the first case, error: webdriverexception:message: ' geckodriver ' executable needs to is in PATH.
6. Geckodriver put to/usr/local/bin/
https://github.com/mozilla/geckodriver/releases
Download version geckodriver-v0.19.0-macos.tar.gz, after decompression will geckodriver storage to/usr/local/bin/path
This article is from the "Xai" blog, make sure to keep this source http://chenxai.blog.51cto.com/10542839/1975695
Mac Robotframework Test Framework Setup