robotframework关键字

这里写自定义目录标题

*** Settings ***
Library Selenium2Library

*** Keywords ***

Checkbox应该不被选择
[Arguments] ${locator}
Checkbox Should Not Be Selected ${locator}

Frame应该包含文本
[Arguments] ${locator} ${text} ${loglevel}=INFO
Frame Should Contain ${locator} ${text} ${loglevel}

List应该无选项
[Arguments] ${locator}
List Should Have No Selections ${locator}

List选项应该是
[Arguments] ${locator} @{items}
List Selection Should Be ${locator} @{items}

Radio按钮不应该被选择
[Arguments] ${group_name}
Radio Button Should Not Be Selected ${group_name}

Radio按钮应该被设置成
[Arguments] ${group_name} ${value}
Radio Button Should Be Set To ${group_name} ${value}

Url应该包含
[Arguments] ${expected}
Location Should Contain ${expected}

Xpath应该匹配X次
[Arguments] ${xpath} ${expected_xpath_count} ${msg}= ${loglevel}=INFO
Xpath Should Match X Times ${xpath} ${expected_xpath_count} ${msg} ${loglevel}

checkbox应该被选择
[Arguments] ${locator}
checkbox should be selected ${locator}

url应该是
[Arguments] ${url}
Location Should Be ${url}

下次确认选择取消
Choose Cancel On Next Confirmation

下次确认选择确定
Choose Ok On Next Confirmation

从List中取消选项
[Arguments] ${locator} @{items}
Unselect From List ${locator} @{items}

从List选择选项
[Arguments] ${locator} @{items}
Select From List ${locator} @{items}

偏移拖拽
[Arguments] ${source} ${xoffset} ${yoffset}
Drag And Drop By Offset ${source} ${xoffset} ${yoffset}

元素应该不包含文本
[Arguments] ${locator} ${expected} ${msg}=
Element Should Not Contain ${locator} ${expected} ${msg}

元素应该不可用
[Arguments] ${locator}
Element Should Be Disabled ${locator}

元素应该不可见
[Arguments] ${locator} ${msg}=
Element Should Not Be Visible ${locator} ${msg}

元素应该包含文本
[Arguments] ${locator} ${text}
Element Should Contain ${locator} ${text}

元素应该匹配x次
[Arguments] ${locator} ${count} ${msg}= ${loglevel}=INFO
Locator Should Match X Times ${locator} ${count} ${msg} ${loglevel}

元素应该可用
[Arguments] ${locator}
Element Should Be Enabled ${locator}

元素应该可见
[Arguments] ${locator}
Element Should Be Visible ${locator}

元素文本应该是
[Arguments] ${locator} ${expected} ${msg}=
Element Text Should Be ${locator} ${expected} ${msg}

全选List元素
[Arguments] ${locator}
Select All From List ${locator}

关闭所有浏览器
Close All Browsers

关闭浏览器
Close Browser

关闭窗口
Close Window

切换浏览器
[Arguments] ${index}
Switch Browser ${index}

创建Webdriver
[Arguments] ${driver_name} ${alias}= ${kwargs}={}
Create Webdriver ${driver_name} ${alias} ${kwargs}

删除Cookie
[Arguments] ${name}
Delete Cookie ${name}

删除所有Cookie
Delete All Cookies

删除本地策略
[Arguments] ${strategy_name}
Remove Location Strategy ${strategy_name}

刷新页面
Reload Page

双击元素
[Arguments] ${locator}
Double Click Element ${locator}

取消选择Checkbox
[Arguments] ${locator}
Unselect Checkbox ${locator}

取消选择Frame
Unselect Frame

回退
Go Back

在图片上按下鼠标左键
[Arguments] ${locator}
Mouse Down On Image ${locator}<

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值