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 ...
随机推荐
- Line Search and Quasi-Newton Methods 线性搜索与拟牛顿法
Gradient Descent 机器学习中很多模型的参数估计都要用到优化算法,梯度下降是其中最简单也用得最多的优化算法之一.梯度下降(Gradient Descent)[3]也被称之为最快梯度(St ...
- Matlab多个Figure图合成一个Fig
案例:之前跑过的程序 已经生成了多个matlab图,现在需要进行合并到一个图中. 解决方案,利用图像句柄把figure图像中的参数读入到内存中,然后重新subplot绘制. 程序如下: clc;cle ...
- Kruskal
算法描述:克鲁斯卡尔算法需要对图的边进行访问,所以克鲁斯卡尔算法的时间复杂度只和边又关系,可以证明其时间复杂度为O(eloge). 算法过程: 1.将图各边按照权值进行排序 2找出权值最小的边,(条件 ...
- 总结Selenium自动化测试方法(一)自动化测试基础
总结Selenium自动化测试方法 一.自动化测试基础 1.什么样的项目适合自动化测试 ①任务测试明确,不会频繁变动 ②每日构建后的测试验证 ③比较频繁的回归测试 ④软件系统界面稳定.变动少 ⑤需要在 ...
- 谈谈Perforce
实习就要结束了,收获之一就是学会了使用Perforce! Perforce SCM System是一款构建于可伸缩客户/服务器结构之上的软件配置管理工具.仅仅应用 TCP/IP,开发人员就能够通过多种 ...
- svn:revert to this version 和 revert changes from this version的区别
假设我们有许多个版本,版本号分别是1-10 如果我们在7这里选择revert to this version那么7之后的8,9,10的操作都会被消除 如果在7选择revert changes from ...
- depth_write
Sets whether or not this pass renders with depth-buffer writing on or not. Format: depth_write <o ...
- ArrayAdapter参数的不同运用
ArrayAdapter参数不同带来的效果不同 String[] array = {"a","b","c","d",&q ...
- MVC 中使用扩展方法
扩展方法(Extension Method)是给那些不是你拥有.因而不能直接修改的类添加方法的一种方便的办法. 一.使用扩展方法 1.定义一个购物车的类-ShoppingCart using Sys ...
- UVa 1595 (水题) Symmetry
颓废的一个下午,一直在切水题,(ˉ▽ ̄-) 首先如果这些点是对称的话,那么它们的对称轴就是x = m,m是横坐标的平均值. 把这些点放到一个集合里,然后扫描每个点,计算出它关于x = m的对称点,看这 ...