IEDriver下载

RF教程葡萄 发表了文章 • 0 个评论 • 3094 次浏览 • 2014-12-30 21:25 • 来自相关话题

**以下是下载链接,方便被墙的同学下载**

[IEDriverServer_Win32_2.44.0 2014-10-23](http://pan.baidu.com/s/1i37oMBr)


[IEDriverServer_Win32_2.43.0 2014-09-09](http://pan.baidu.com/s/1pJqhASb) 查看全部
**以下是下载链接,方便被墙的同学下载**

[IEDriverServer_Win32_2.44.0 2014-10-23](http://pan.baidu.com/s/1i37oMBr)


[IEDriverServer_Win32_2.43.0 2014-09-09](http://pan.baidu.com/s/1pJqhASb)

chromedriver下载

RF教程葡萄 发表了文章 • 3 个评论 • 5434 次浏览 • 2014-12-30 21:13 • 来自相关话题

**以下是下载链接,方便被墙的同学下载**

[chromedriver v2.13 2014-12-10](http://pan.baidu.com/s/1gdw34pP)


[chromedriver v2.12 2014-10-27](http://pan.baidu.com/s/1jGBq6GY)


**以下是官方的更新说明**

----------ChromeDriver v2.13 (2014-12-10)----------
Supports Chrome v38-41
Resolved issue 997: Chromedriver times out waiting for Tracing.end command to respond [OS-All, Pri-0]
Resolved issue 980: GoBack command times out on all platforms [OS-All, Pri-0]
Resolved issue 978: ChromeDriver port server fails to reserve port [OS-Linux, Pri-0]
Resolved issue 653: Commands goBack and goForward have race condition. [Pri-1]
Resolved issue 845: chromedriver fails with "Chrome version must be >= 31.0.1650.59" on Android 4.4.3 webviews [OS-Android, Pri-1]
Resolved issue 626: silence chrome logging by default on windows [Pri-1]
Resolved issue 973: ChromeDriver fails to close DevTools UI before executing commands [OS-All, Pri-2]

----------ChromeDriver v2.12 (2014-10-27)----------
Supports Chrome v36-40
Resolved issue 946: ChromeDriver can't parse short git hashes from Chrome OS [Pri-0]
Resolved issue 906: Chromedriver cannot be instantiated on CrOS with **kwargs [OS-Chrome, Pri-1]
Resolved issue 944: When using mobile emulation, window.screen.height/width doesn't reflect phone's screen resolution [Pri-1]
Resolved issue 916: Selenium (javascript) fails when switching to webview window in Chrome apps [Pri-2]
Resolved issue 945: touch events sometimes don't work in mobile emulation mode [Pri-2]
Resolved issue 611: Prefs capability should override custom user data dir prefs [Pri-3]
Resolved issue 926: Chromedriver memory leak in devtools_client_impl.cc []

----------ChromeDriver v2.11 (2014-10-07)----------
Supports Chrome v36-40
Resolved issue 815: testShouldHandleNewWindowLoadingProperly fails on ToT builds [OS-All, Pri-0]
Resolved issue 908: No way to exclude switches on Android [OS-Android, Pri-0]
Resolved issue 868: SelectElementHandlingTest.testShouldBeAbleToSelectMoreThanOneOptionFromASelectWhichAllowsMultipleChoices failing [OS-All, Pri-0]
Resolved issue 399: Extend ChromeDriver capabilities to cover mobile emulation tools in Chrome DevTools [Pri-1, Type-Enhancement]
Resolved issue 906: Chromedriver cannot be instantiated on CrOS with **kwargs [OS-Chrome, Pri-1]
Resolved issue 776: ChromeDriver does not accept extensions of zip file format any more [OS-All, Pri-2]
Resolved issue 799: Chrome starts with message "You are using an unsupported command-line flag: --ignore-certifcate-errors. Stability and security will suffer." [OS-All, Pri-3]

----------ChromeDriver v2.10 (2014-05-01)----------
Supports Chrome v33-36
Resolved issue 780: Deny remote connections unless --whitelisted-ips is passed. [Pri-0]
Resolved issue 698: implement touch flick command on Android [Pri-1]
Resolved issue 760: Implement command to switch to parent frame [Pri-1]
Resolved issue 152: Support --version switch [Pri-3]

----------ChromeDriver v2.9 (2014-01-31)----------
Supports Chrome v31-34
Resolved issue 665: Use /data/local/tmp for command line flags on user builds [OS-Android, Pri-0]
Resolved issue 696: Return window handle to App window (like Google Keep) in command driver.getWindowHandles [Pri-0]
Resolved issue 694: Update http://chromedriver.storage.go ... LEASE for users to query for latest release and do automatic update in script [Pri-0]
Resolved issue 690: Fix clicking on Map Area [Pri-0]
Resolved issue 454: chromedriver didn't support Debian 7 [Pri-0]
Resolved issue 638: chomedriver.exe 2.6 to 2.8 built on Win7 build bot always produce empty chromedriver.log on local windows machine. [Pri-0]
Resolved issue 672: Wait 60 seconds for chrome to start up on all OS and 30 seconds for chrome shutdown on Mac and Linux. [Pri-0]
Resolved issue 660: Port used for android adb forward leaks. [Pri-0]
Resolved issue 676: LaunchApp method for launching Chrome apps using their ID [OS-All, Pri-0] 查看全部
**以下是下载链接,方便被墙的同学下载**

[chromedriver v2.13 2014-12-10](http://pan.baidu.com/s/1gdw34pP)


[chromedriver v2.12 2014-10-27](http://pan.baidu.com/s/1jGBq6GY)


**以下是官方的更新说明**

----------ChromeDriver v2.13 (2014-12-10)----------
Supports Chrome v38-41
Resolved issue 997: Chromedriver times out waiting for Tracing.end command to respond [OS-All, Pri-0]
Resolved issue 980: GoBack command times out on all platforms [OS-All, Pri-0]
Resolved issue 978: ChromeDriver port server fails to reserve port [OS-Linux, Pri-0]
Resolved issue 653: Commands goBack and goForward have race condition. [Pri-1]
Resolved issue 845: chromedriver fails with "Chrome version must be >= 31.0.1650.59" on Android 4.4.3 webviews [OS-Android, Pri-1]
Resolved issue 626: silence chrome logging by default on windows [Pri-1]
Resolved issue 973: ChromeDriver fails to close DevTools UI before executing commands [OS-All, Pri-2]

----------ChromeDriver v2.12 (2014-10-27)----------
Supports Chrome v36-40
Resolved issue 946: ChromeDriver can't parse short git hashes from Chrome OS [Pri-0]
Resolved issue 906: Chromedriver cannot be instantiated on CrOS with **kwargs [OS-Chrome, Pri-1]
Resolved issue 944: When using mobile emulation, window.screen.height/width doesn't reflect phone's screen resolution [Pri-1]
Resolved issue 916: Selenium (javascript) fails when switching to webview window in Chrome apps [Pri-2]
Resolved issue 945: touch events sometimes don't work in mobile emulation mode [Pri-2]
Resolved issue 611: Prefs capability should override custom user data dir prefs [Pri-3]
Resolved issue 926: Chromedriver memory leak in devtools_client_impl.cc []

----------ChromeDriver v2.11 (2014-10-07)----------
Supports Chrome v36-40
Resolved issue 815: testShouldHandleNewWindowLoadingProperly fails on ToT builds [OS-All, Pri-0]
Resolved issue 908: No way to exclude switches on Android [OS-Android, Pri-0]
Resolved issue 868: SelectElementHandlingTest.testShouldBeAbleToSelectMoreThanOneOptionFromASelectWhichAllowsMultipleChoices failing [OS-All, Pri-0]
Resolved issue 399: Extend ChromeDriver capabilities to cover mobile emulation tools in Chrome DevTools [Pri-1, Type-Enhancement]
Resolved issue 906: Chromedriver cannot be instantiated on CrOS with **kwargs [OS-Chrome, Pri-1]
Resolved issue 776: ChromeDriver does not accept extensions of zip file format any more [OS-All, Pri-2]
Resolved issue 799: Chrome starts with message "You are using an unsupported command-line flag: --ignore-certifcate-errors. Stability and security will suffer." [OS-All, Pri-3]

----------ChromeDriver v2.10 (2014-05-01)----------
Supports Chrome v33-36
Resolved issue 780: Deny remote connections unless --whitelisted-ips is passed. [Pri-0]
Resolved issue 698: implement touch flick command on Android [Pri-1]
Resolved issue 760: Implement command to switch to parent frame [Pri-1]
Resolved issue 152: Support --version switch [Pri-3]

----------ChromeDriver v2.9 (2014-01-31)----------
Supports Chrome v31-34
Resolved issue 665: Use /data/local/tmp for command line flags on user builds [OS-Android, Pri-0]
Resolved issue 696: Return window handle to App window (like Google Keep) in command driver.getWindowHandles [Pri-0]
Resolved issue 694: Update http://chromedriver.storage.go ... LEASE for users to query for latest release and do automatic update in script [Pri-0]
Resolved issue 690: Fix clicking on Map Area [Pri-0]
Resolved issue 454: chromedriver didn't support Debian 7 [Pri-0]
Resolved issue 638: chomedriver.exe 2.6 to 2.8 built on Win7 build bot always produce empty chromedriver.log on local windows machine. [Pri-0]
Resolved issue 672: Wait 60 seconds for chrome to start up on all OS and 30 seconds for chrome shutdown on Mac and Linux. [Pri-0]
Resolved issue 660: Port used for android adb forward leaks. [Pri-0]
Resolved issue 676: LaunchApp method for launching Chrome apps using their ID [OS-All, Pri-0]

【RF教程】Selenium2Library在线安装

RF教程葡萄 发表了文章 • 2 个评论 • 2815 次浏览 • 2014-12-30 20:59 • 来自相关话题

pip直接在线安装,相当方便

pip install -U robotframework-selenium2library -i http://pypi.douban.com/simple/






他会自动安装上所有依赖

如Selenium,decorator,docutils等







显示安装成功之后,我们再去ride引入验证一下吧

点击library






输入Selenium2Library (注意大小写哦,S大写,L大写)






如果安装和导入成功,应该是黑色
如果没有安装,或者安装不完整,会显示红色 查看全部
pip直接在线安装,相当方便

pip install -U robotframework-selenium2library -i http://pypi.douban.com/simple/

s2l.png


他会自动安装上所有依赖

如Selenium,decorator,docutils等


s2lfinish.png


显示安装成功之后,我们再去ride引入验证一下吧

点击library

s1.png


输入Selenium2Library (注意大小写哦,S大写,L大写)

s2.png


如果安装和导入成功,应该是黑色
如果没有安装,或者安装不完整,会显示红色

s3.png



如何自定义测试库(转载)

RF教程crazier 发表了文章 • 15 个评论 • 13905 次浏览 • 2014-12-30 16:42 • 来自相关话题

在网上下载的各种测试库,往往因为各种原因总是不那么完美,现在来学习一下怎么自定义一个RFS库吧!
Step 1.
给自定义库起名,如MyLibrary。操作:在Python目录下"..\Lib\site-packages"
建立文件夹"MyLibrary"。

Step 2.
在"MyLibrary"文件夹中新建一个"version.py"文件,用于描述自定义测试库的版本信息。
代码如下:

[lang=python]
VERSION = '1.0'
[/lang]

在"MyLibrary"文件夹中新建一个keywords类。可以起名为:"testTemp.py"。
代码如下:

[lang=python]
class TestTemp(object):
def __init__(self):
pass

def mytest(self):
print "mytest"
[/lang]

Step 3.
在"MyLibrary"文件夹中新建1个"__init__.py"文件,用于定义自定义库的相关信息。
和需要用到的keywords调用继承和声明。
代码如下:
[lang=python]
from testTemp import TestTemp
from version import VERSION

_version_ = VERSION

class MyLibrary(TestTemp):
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
[/lang]
启动ride程序在setting部分添加library库信息,添加库名为MyLibrary,
即可成功导入自定义库。

注意:
库文件夹名称一定要和类名称相同(MyLibrary),否则导入自定义库时会出错。 查看全部
在网上下载的各种测试库,往往因为各种原因总是不那么完美,现在来学习一下怎么自定义一个RFS库吧!
Step 1.
给自定义库起名,如MyLibrary。操作:在Python目录下"..\Lib\site-packages"
建立文件夹"MyLibrary"。

Step 2.
在"MyLibrary"文件夹中新建一个"version.py"文件,用于描述自定义测试库的版本信息。
代码如下:

[lang=python]
VERSION = '1.0'
[/lang]

在"MyLibrary"文件夹中新建一个keywords类。可以起名为:"testTemp.py"。
代码如下:

[lang=python]
class TestTemp(object):
def __init__(self):
pass

def mytest(self):
print "mytest"
[/lang]

Step 3.
在"MyLibrary"文件夹中新建1个"__init__.py"文件,用于定义自定义库的相关信息。
和需要用到的keywords调用继承和声明。
代码如下:
[lang=python]
from testTemp import TestTemp
from version import VERSION

_version_ = VERSION

class MyLibrary(TestTemp):
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
[/lang]
启动ride程序在setting部分添加library库信息,添加库名为MyLibrary,
即可成功导入自定义库。

注意:
库文件夹名称一定要和类名称相同(MyLibrary),否则导入自定义库时会出错。

Xpath中使用正则表达式

RF教程zhangzhe0707 发表了文章 • 1 个评论 • 9627 次浏览 • 2014-12-30 10:03 • 来自相关话题

一、函数:
contains是一个字符串查找函数

  语法是:fn:contains(string1,string2),表示如果 string1 包含 string2,则返回 true,否则返回 false。

  例如:contains('XML','XM'),结果:true。

match是一个匹配正则表达式的函数

  语法是:fn:matches(string,pattern),表示如果 string 参数匹配指定的模式,则返回 true,否则返回 false。

  例如:matches("12", "[0-9]{1,2}"), 结果:true。

starts-with是一个字符串查找函数

  语法是:fn:starts-with(string,pattern),表示如果 string 参数匹配指定的模式,则返回 true,否则返回 false。

  例如:matches("12", "[0-9]{1,2}"), 结果:true。



二、实例:
HTML代码:
<a class="btnX btnSelectedBG" href="#"><span>Sign in</span></a>

xpath:
contains:.//a[contains(@class,'btnX') and .//text()='Sign in']
starts-with:.//a[starts-with(@class,'btnSelectedBG')] 查看全部
一、函数:
contains是一个字符串查找函数

  语法是:fn:contains(string1,string2),表示如果 string1 包含 string2,则返回 true,否则返回 false。

  例如:contains('XML','XM'),结果:true。

match是一个匹配正则表达式的函数

  语法是:fn:matches(string,pattern),表示如果 string 参数匹配指定的模式,则返回 true,否则返回 false。

  例如:matches("12", "[0-9]{1,2}"), 结果:true。

starts-with是一个字符串查找函数

  语法是:fn:starts-with(string,pattern),表示如果 string 参数匹配指定的模式,则返回 true,否则返回 false。

  例如:matches("12", "[0-9]{1,2}"), 结果:true。



二、实例:
HTML代码:
<a class="btnX btnSelectedBG" href="#"><span>Sign in</span></a>

xpath:
contains:.//a[contains(@class,'btnX') and .//text()='Sign in']
starts-with:.//a[starts-with(@class,'btnSelectedBG')]

【RF教程】robotframework的安装(三) ride

RF教程葡萄 发表了文章 • 9 个评论 • 35514 次浏览 • 2014-12-29 23:59 • 来自相关话题

ride最为最适合,最好用的RF编辑器(个人观点)必须要安装啊

ride是基于wxpython开发,所以我们先安装一下wxpython吧

建议安装2.8的版本 [wxPython2.8](http://www.robotframework.net/article/11)

安装完毕之后,还是直接pip即可

pip install robotframework-ride

还是看到
Successfully installed robotframework
Cleaning up...
就ok了








之后,你在命令行输入ride,出现ride的界面,那么恭喜你,最基本的rf环境已经搭建完毕了! 查看全部
ride最为最适合,最好用的RF编辑器(个人观点)必须要安装啊

ride是基于wxpython开发,所以我们先安装一下wxpython吧

建议安装2.8的版本 [wxPython2.8](http://www.robotframework.net/article/11)

安装完毕之后,还是直接pip即可

pip install robotframework-ride

还是看到
Successfully installed robotframework
Cleaning up...
就ok了


ride安装.png



之后,你在命令行输入ride,出现ride的界面,那么恭喜你,最基本的rf环境已经搭建完毕了!


ride.png

【RF教程】robotframework的安装(二) robotframework

RF教程葡萄 发表了文章 • 2 个评论 • 5195 次浏览 • 2014-12-29 23:39 • 来自相关话题

之前的Python环境ok之后,即可进入重头戏了

安装robotframework

这里介绍一种最简便的方式,使用pip命令

前提就是你必须要可以连接互联网哦。

pip install robotframework

(可能会发生下载不了,可以换豆瓣的源
pip install robotframework -i http://pypi.douban.com/simple/)

如果一切顺利,你会看到
Successfully installed robotframework
Cleaning up...






之后你可以在命令行输入pybot --version 显示出版本,说明安装成功 查看全部
之前的Python环境ok之后,即可进入重头戏了

安装robotframework

这里介绍一种最简便的方式,使用pip命令

前提就是你必须要可以连接互联网哦。

pip install robotframework

(可能会发生下载不了,可以换豆瓣的源
pip install robotframework -i http://pypi.douban.com/simple/

如果一切顺利,你会看到
Successfully installed robotframework
Cleaning up...

QQ截图20141229233509.png


之后你可以在命令行输入pybot --version 显示出版本,说明安装成功


QQ截图20141229233842.png

【RF教程】robotframework的安装(一) Python环境

RF教程葡萄 发表了文章 • 3 个评论 • 8908 次浏览 • 2014-12-29 23:24 • 来自相关话题

首先我们就是需要一个Python的环境

这个相当容易,我在这里推荐ActivePython

因为ActivePython会自动配置好path,且已经集成了pip等常用库,相当方便

下载地址 [http://www.activestate.com/activepython/downloads](http://www.activestate.com/activepython/downloads)








记得下载2.7的Python哦,RF还没有支持3.x吧

下载之后,在Windows上安装相当容易,一直下一步基本就ok了

之后在命令行打Python,出现下图类似画面,即安装成功了! 查看全部
首先我们就是需要一个Python的环境

这个相当容易,我在这里推荐ActivePython

因为ActivePython会自动配置好path,且已经集成了pip等常用库,相当方便

下载地址 [http://www.activestate.com/activepython/downloads](http://www.activestate.com/activepython/downloads)


捕获.PNG



记得下载2.7的Python哦,RF还没有支持3.x吧

下载之后,在Windows上安装相当容易,一直下一步基本就ok了

之后在命令行打Python,出现下图类似画面,即安装成功了!


QQ截图20141229232238.png