seleniumIDE常用命令(二)-Accessor

selenium命令三种类型:action(操作)、accessor(存储)、assertion(断言)

1、Accessor命令:

store(expression,variableName)-将指定的值存储在变量中

storeTitle(variableName)-用于存放当前网页的标题

storeLocation(variableName)-用于存储当前网页的url

storeValue(locator,variableName)-用于存储input元素所存放的值(on/off)

storeEditable(locator,variableName)-用于存储input元素的可编辑状态

storeText(locator,variableName)-用于存储某个元素的文本值

storeChecked(locator,variableName)-存储复选框或单选框的勾选情况(true/false)

storeSelectedIndex(SelectLocator,variableName)-获取所选项在列表中的索引

storeSelectedLable(SelectLocator,variableName)-获选指定列表中所选项的文本值

storeSelectedValue(SelectLocator,variableName)-获选指定列表中所选项的真实值(value属性)

storeSelectedOptions(SelectLocator,variableName)-获选指定列表中所有选项的文本

storeTable(tableCellAddress,variableName)-获取表格中某个单元格的值(target格式:表格的定位

表达式.行号.列号)

storeAttribute(attributeLocator,variableName)-获取指定属性的值(target格式:元素定位表达式+@属性名称)

storeTextPresent(pattern,variableName)-验证指定的文本是否在页面中出现(true/false)

storeElementPresent(locator,variableName)-验证指定元素是否在页面中出现

storeVisible(locator,variableName)-验证页面上看不到的元素是否在页面中出现

storeSpeed(variableName)-获取执行速度


分享到:


相關文章: