使用Robot Framework集成Selenium的自动化测试(六)

Ronnyxie 2013-04-11

robotframework-selenium如果需要远程连接,建议引用包SSHLibrary,它的运行依赖于2个条件,http://code.google.com/p/robotframework-sshlibrary/wiki/InstallationInstructionscode-google上面有下面的描述:

引用

ApreconditionforusingSSHLibrarywithPythonishavingSSHmodulenamedparamikoinstalled.Paramikoitselfhassomeotherrequirementslistedininstallationinstructions(mainlyPyCrypto)andthesemustnaturallybeinstalledtoo.PyCryptobinariesforWindowsareavailableherefor32bitWindowsandherefor64bitWindows.

InWindows,paramikohastobeinstalledfromthesourcedistribution,byunzippingthedownload,andthenrunningpythonsetup.pyinstallintheunzippeddirectory.

需要Pycrypto和paramiko安装完以后才能起作用,(python肯定是需要的)

1.Pycrypto

下载地址:http://www.voidspace.org.uk/python/modules.shtml在里面找到对应python版本的安装,

安装完成以后运行python.exe或者python的GUI界面,输入下面的命令:

引用

importCrypto

注意大小写,写错python就不能识别了。

2.paramiko

下载地址:http://www.lag.net/paramiko/

因为没有exe格式的,只能下载zip的,放在本地,然后解压后进入

调用命令

引用

pythonsetup.pybuild

pythonsetup.pyinstall

python是加到path里面去的

安装完成以后运行python.exe或者python的GUI界面,输入下面的命令:

引用

importparamiko

注意大小写,写错python就不能识别了。

3.SSHLibrary

下载地址就是上面文档的地址,exe正常安装即可

安装完成以后可以验证下,方法同上。

最后打开ride.py(前提是你装了RIDE)可以将SSHLibrary导入。

参考了下面的博客,但是跳过了GCC

http://www.cnblogs.com/gannan/archive/2012/02/06/2339883.html

相关推荐