Robot Framework 环境搭建(Web)
安装步骤:
1.安装Python 2.7.14
2.安装wxPython 2.8
http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/
http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/
3.安装pip
安装robortframework-ride
pip install robotframework-ride
安装robotframework-selenium2library
pip install --upgrade robotframework-selenium2library
4.启动RIDE
Python [PythonDirectory]\ride.py
Python [PythonDirectory]\ride.py
Tips:
如果未安装2启动RIDE时会出现如下报错:
Wrong wxPython version.
You need to install wxPython 2.8.12.1 with unicode support to run RIDE.
wxPython 2.8.12.1 can be downloaded from http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/
You need to install wxPython 2.8.12.1 with unicode support to run RIDE.
wxPython 2.8.12.1 can be downloaded from http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/
安装Python3类似
升级pip:
python -m pip install --upgrade pip
安装robotframework:
安装wxPython:
默认下载源网站慢出现ReadTimeoutError,建议使用豆瓣源,以下命令安装
pip install -i https://pypi.douban.com/simple wxPython==4.0.4
安装RIDE:
pip install robotframework-ride
pip install -i https://pypi.douban.com/simple robotframework-ride
最后可以pip list确认是否安装成功
安装三大浏览器驱动driver
1.chromedriver 下载地址:https://code.google.com/p/chromedriver/downloads/list
1.chromedriver 下载地址:https://code.google.com/p/chromedriver/downloads/list
Chrome浏览器版本及对应版本驱动下载:
http://npm.taobao.org/mirrors/chromedriver/
2.Firefox的驱动geckodriver 下载地址:https://github.com/mozilla/geckodriver/releases/
3.IE的驱动IEdriver 下载地址:http://www.nuget.org/packages/Selenium.WebDriver.IEDriver/
http://npm.taobao.org/mirrors/chromedriver/
2.Firefox的驱动geckodriver 下载地址:https://github.com/mozilla/geckodriver/releases/
3.IE的驱动IEdriver 下载地址:http://www.nuget.org/packages/Selenium.WebDriver.IEDriver/
安装完成之后需要把对应的驱动文件(谷歌浏览器的叫“chromedriver.exe”)放在对应Python版本的根目录下,例如Python 2.7的根目录名叫Python27