robotframework搭建 - 18570580798/study GitHub Wiki

Installation Instructions Robot Framework Preconditions Python Installation Using -pip Installing from source Lack of permission Webdriver RIDE Preconditions Python WxPython Robot Framework Installation Using -pip Installing from source Related articles Robot Framework Preconditions Robot Framework is supported on Python (both Python 2 and Python 3), and frequently works with Selenium. Python You could get Python 2.7.5 from the App Store on EDLP. And you might need to add (e.g. C:\Python27\Scripts;) to PATH of environment variable. Installation Using -pip install selenium 3.6 pip install selenium==3.6.0 install robotframework pip install robotframework install robotframework-seleniumlibrary 3.0 pip install robotframework-seleniumlibrary==3.0.0b3 Installing from source You need to install setuptools first with python 2.7.5. install setuptools download setuptools-36.5.0.zip from https://pypi.python.org/pypi/setuptools unzip open the Windows Command Prompt from the source code folder, and run python setup.py install install selenium 3.6 download selenium-3.6.0.tar.gz from https://pypi.python.org/pypi/selenium/3.6.0 unzip open the Windows Command Prompt from the source code folder, and run python setup.py install install robotframework download robotframework-302.tar.gz from https://pypi.python.org/pypi/robotframework/3.0.2 unzip open the Windows Command Prompt from the source code folder, and run python setup.py install Since bat files will be deleted because lack of permission, you need to make pybot, rebot as cmd files under See blow: Lack of permission

install robotframework-seleniumlibrary 3.0 download robotframework-seleniumlibrary-3.0.0b3.tar.gz from https://pypi.python.org/pypi/robotframework-seleniumlibrary/3.0.0b3 unzip open the Windows Command Prompt from the source code folder, and run python setup.py install Lack of permission open the make pybot.cmd make a txt file with code: @echo off python -m robot.run %* save it as pybot.cmd make rebot.cmd make a txt file with code: @echo off python -m robot.rebot %* save it as rebot.cmd Webdriver Selenium requires a driver to interface with the chosen browser. Firefox, for example, requires geckodriver, which needs to be installed in your PATH. e.g. In linux, place it in /usr/bin or /usr/local/bin; in windows, you could just place it in c:\python27. Chromedriver for Chrome: https://chromedriver.storage.googleapis.com/index.html check note.txt to find out which version you need to download Geckodriver for FireFox: https://github.com/mozilla/geckodriver/releases Ghostdriver for Phantomjs: Phantomjs contains ghostdriver, you just need to add your Phantomjs directory in PATH. RIDE RIDE(RobotFramework IDE) is a test data editor for Robot Framework test data. It's not necessary if you only want to run a test. Preconditions Python RIDE runs only on the regular Python, not on Jython nor IronPython. Python 2.6 is the minimum version. Notice that RIDE does not yet support Python 3. Directories added to PATH as part of the Robot Framework installation must not contain quotes. Otherwise RIDE may not be able to execute tests due to a bug in Python. WxPython RIDE's GUI is implemented using wxPython toolkit. Only wxPython 2.8.12.1 with Unicode support is officially supported. You could download an appropriate installer from wxPython download page. e.g. wxPython2.8-win64-unicode-2.8.12.1-py27.exe for x64 windows and python2.7 Robot Framework If RIDE is used only to edit test cases, Robot Framework does not need to installed at all. However, the Test runner plugin requires Robot Framework to be separately installed. Installation Using -pip

pip install robotframework-ride

Installing from source

download robotframework-ride-1.5.2.1.tar.gz from https://pypi.python.org/pypi/robotframework-ride/1.5.2.1 unzip open the Windows Command Prompt from the source code folder, and run python setup.py install