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 ...
随机推荐
- C++:获取数组长度
C/C++中如何获取数组的长度? 如何获取数组的长度 2010-12-15 20:49 C/C++中如何获取数组的长度? 收藏 C.C++中没有提供 直接获取数组长度的函数,对于存放字符串 ...
- SQL SERVER ->> Columnstore Index
谈到Columnstore index就不得不提SQL SERVER的压缩技术了.Columnstore就是用到了SQL SERVER的压缩技术.Columnstore又分Columnstore和Co ...
- 常用WinPE
微PE工具箱:http://www.wepe.com.cn/ 绝对PE工具箱:http://dl.pconline.com.cn/download/64736.html 通用PE工具箱:http:// ...
- U3D NGUI改变GameObject Activity闪烁的问题
不是关闭再激活GameObject会闪烁,而是再激活时,NGUI渲染步骤不一致导致的闪烁. 并且文字激活后渲染要慢一帧,如果延迟一帧处理,又会导致精灵图片快一帧,图片重叠.这个测试结果不一定准确,先记 ...
- 多个电脑共用一个ssh
比如我们有多个设备,但不想每个设备上生成一个ssh key,然后去github或其他网站上添加,那样的话,ssh key会比较多,搞起来会比较乱,所以我们想在不同的设备上使用同一个ssh. 做法是,我 ...
- 图解phpstorm常用快捷键
CTRL+N 查找类 CTRL+SHIFT+N 全局搜索文件 ,优先文件名匹配的文件 CIRL+B 找变量的来源,跳到变量申明处 (CTRL+ 鼠标单击 也可以) CTRL+G 定位行,跳转行 CTR ...
- Remember that ordinal parameters are 1-based!
问题发生的原因是:hql语句里不需要参数,却添加了一个参数,删掉添加参数的语句就可以了!
- 【转】Windows Server 2008 以上服务器配置SMTP
建立 SMTP 伺服器 [除非特別說明,否則本主題中的內容適用於 BizTalk Server 2013 和 2013 R2.]原文链接:https://msdn.microsoft.com/zh-t ...
- 如何快速delete数据
苦于qa账号,木有drop,truncate权限,同步数据要挨个delete表里边的数据,就写了个脚本,循环删除某个目标库的所有表里边的数据. 先在information_schema的库里边,通过T ...
- poj 1236 Network of Schools(强连通、缩点、出入度)
题意:给出一个有向图.1:问至少选出多少个点,才能沿有向边遍历所有节点.2:问至少加多少条有向边,使原图强连通. 分析:第一个问题,缩点后找所有树根(入度为0).第二个问题,分别找出入度为0和出度为0 ...