Selenium2Library系列 keywords 之 _SelectElementKeywords
# 公有方法
(1)get_list_items(self, locator) 返回labels集合
_get_select_list_options(self, select_list_or_locator) 返回select, select.options
_get_labels_for_options(self, options) 返回labels集合
(2)get_selected_list_label(self, locator) 返回首个选中项的label
_get_select_list(self, locator) 返回Select 类型元素
(3)get_selected_list_labels(self, locator) 返回所有选中项的labels集合
self._get_select_list_options_selected(locator) 返回select, select.all_selected_options
_get_labels_for_options(self, options) 返回labels集合
(4)get_selected_list_value(self, locator) 返回首个选中项的value属性值
_get_select_list(self, locator) 返回Select 类型元素
(5)get_selected_list_values(self, locator) 返回所有选中项的values集合
self._get_select_list_options_selected(locator) 返回select, select.all_selected_options
self._get_values_for_options(options) 返回values集合
(6)list_selection_should_be(self, locator, *items) 验证options应该为选中状态
self.page_should_contain_list(locator)
self._get_select_list_options_selected(locator)
self._get_values_for_options(options)
self._get_labels_for_options(options)
(7)list_should_have_no_selections(self, locator) 验证select没有选中项
self._get_select_list_options_selected(locator)
self._get_labels_for_options(options)
(8)page_should_contain_list(self, locator, message='', loglevel='INFO') 验证select存在当前页面
self._page_should_contain_element(locator, 'list', message, loglevel)
(9) page_should_not_contain_list(self, locator, message='', loglevel='INFO') 验证select不存在当前页面
self._page_should_not_contain_element(locator, 'list', message, loglevel)
(10)select_all_from_list(self, locator) 选中multi-select的所有选项
self._get_select_list(locator)
select.select_by_index(i)
(11)select_from_list(self, locator, *items) 根据所给的values/labels 选择项
self._get_select_list(locator)
select.select_by_index(i)
select.select_by_value(item)
select.select_by_visible_text(item)
(12)select_from_list_by_index(self, locator, *indexes) 根据indexes选择项
self._get_select_list(locator)
(13)select_from_list_by_value(self, locator, *values) 根据values选择项
self._get_select_list(locator)
(14)select_from_list_by_label(self, locator, *labels) 根据labels选择项
self._get_select_list(locator)
(15)unselect_from_list(self, locator, *items) 根据values/labels不选择项
self._get_select_list(locator)
self._get_select_list_options(select)
(16)unselect_from_list_by_index(self, locator, *indexes) 根据indexes不选择项
self._get_select_list(locator)
(17)unselect_from_list_by_value(self, locator, *values) 根据values不选择项
self._get_select_list(locator)
(18)unselect_from_list_by_label(self, locator, *labels) 根据labels不选择项
self._get_select_list(locator)
#私有方法
(1)_get_labels_for_options(self, options) 返回options的labels集合
(2)_get_select_list(self, locator) 返回Select类型元素
self._element_find(locator, True, True, 'select')
(3)_get_select_list_options(self, select_list_or_locator) 返回select, select.options
self._get_select_list(select_list_or_locator)
(4) _get_select_list_options_selected(self, locator) 返回select, select.all_selected_options
self._get_select_list(locator)
(5)_get_values_for_options(self, options) 返回options的values集合
(6)_is_multiselect_list(self, select) 验证Select 元素是否为multiselect
(7)_unselect_all_options_from_multi_select_list(self, select) 不选中所有项
(8)_unselect_option_from_multi_select_list(self, select, options, index) 不选中指定optoin
Selenium2Library系列 keywords 之 _SelectElementKeywords的更多相关文章
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_label(self, locator, *labels)
def unselect_from_list_by_label(self, locator, *labels): """Unselects `*labels` from ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_value(self, locator, *values)
def unselect_from_list_by_value(self, locator, *values): """Unselects `*values` from ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_index(self, locator, *indexes)
def unselect_from_list_by_index(self, locator, *indexes): """Unselects `*indexes` fro ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list(self, locator, *items)
def unselect_from_list(self, locator, *items): """Unselects given values from select ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_label(self, locator, *labels)
def select_from_list_by_label(self, locator, *labels): """Selects `*labels` from list ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_value(self, locator, *values)
def select_from_list_by_value(self, locator, *values): """Selects `*values` from list ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list(self, locator, *items)
def select_from_list(self, locator, *items): """Selects `*items` from list identified ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_should_have_no_selections(self, locator)
def list_should_have_no_selections(self, locator): """Verifies select list identified ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_selection_should_be(self, locator, *items)
def list_selection_should_be(self, locator, *items): """Verifies the selection of sel ...
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_values(self, locator)
def get_selected_list_values(self, locator): """Returns the values of selected elemen ...
随机推荐
- 源码深度解析SpringMvc请求运行机制(转)
源码深度解析SpringMvc请求运行机制 本文依赖的是springmvc4.0.5.RELEASE,通过源码深度解析了解springMvc的请求运行机制.通过源码我们可以知道从客户端发送一个URL请 ...
- 307. Range Sum Query - Mutable
题目: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclu ...
- wrong number of arguments,java方法反射时数组参数的坑
java方法中只有一个参数是数组,反射的时候我们不能想当然的传歌数组进去,传数组进去的时候表示多个参数. 两个数组不是一个意思啊. 我们应该把数组转为objet,这样才表示一个参数. import j ...
- HDU 4617 Weapon 三维计算几何
题意:给你一些无限长的圆柱,知道圆柱轴心直线(根据他给的三个点确定的平面求法向量即可)与半径,判断是否有圆柱相交.如果没有,输出柱面最小距离. 一共只有30个圆柱,直接暴力一下就行. 判相交/相切:空 ...
- git 创建branch分支【转】
转自:http://www.cnblogs.com/jackluo/p/3499731.html 开发者user1 负责用getopt 进行命令解析的功能,因为这个功能用到getopt 函数,于是将这 ...
- Android eclipse中程序调试
一:断点调试 用eclipse开发android程序的时,跟VS一样是可以断点单步调试的.步骤如下.1 设置断点:在编码窗体的左边框上用鼠标双击,或者右键点击菜单,选择 Toggle Breakpoi ...
- SPOJ 2916 Can you answer these queries V(线段树-分类讨论)
题目链接:http://www.spoj.com/problems/GSS5/ 题意:给出一个数列.每次查询最大子段和Sum[i,j],其中i和j满足x1<=i<=y1,x2<=j& ...
- Android findBugs
1.Bug:DM_BOXED_PRIMITIVE_FOR_PARSING "Boxing/unboxing to parse a primitive", A boxed primi ...
- SCSS(SASS、CSS)学习
看的这篇文章 http://www.frostsky.com/2014/07/sass-scss/ 写的还比较清晰 SASS是CSS3的一个扩展,增加了规则嵌套.变量.混合.选择器继承等等.通过使用命 ...
- 如何将SQLite数据库(dictionary.db文件)与apk文件一起发布
可以将dictionary.db文件复制到Eclipse Android工程中的res\raw目录中,如图1所示.所有在res\raw目录中的文件不会被压缩,这样可以直接提取该目录中的文件.使 用 ...