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 ...
随机推荐
- Ubuntu LAMP搭建
为了数据库课程设计,只好自己搭一个数据库系统,采用LAMP方式. 一.安装 1.安装Apache sudo apt-get install apache2 Apache在安装期间会新建一个目录:/va ...
- TCP释放连接的四次挥手过程
TCP断开连接的过程:TCP四次挥手. 数据传输结束后,通信的双方都可释放连接.现在A和B都处于ESTABLISHED状态.A的应用进程先向TCP发出连接释放报文段,主动关闭TCP连接.A把连接释放报 ...
- java string,需要进行首字母大写改写
java string,需要进行首字母大写改写,网上大家的思路基本一致,就是将首字母截取,转化成大写然后再串上后面的,类似如下代码 //首字母大写 public static String c ...
- python csv tsv处理
空行: http://www.crifan.com/python_csv_writer_writerow_redundant_new_line/
- tomcat7 1000并发量配置 tomcat7配置优化
修改tomcat/conf/server.xml配置文件. <Executor name="tomcatThreadPool" namePrefix="catali ...
- G-sensor 与M-sensor区别
g-sensor是重力传感器,能感应芯片在三个方向(通常是)上的重力加速度.手机里的重力球用的就是这个技术,m-sensor如果是motion sensor的简称的话,基本上指的和g-sensor是一 ...
- BZOJ 1878 HH的项链(树状数组)
题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=1878 题意:给出一个数列,每次询问区间[L,R]中有多少个不同的数字? 思路: (1)记 ...
- 计算机术语install和setup的区别
作为安装程序的Setup文件是软件的开发者专门为其软件设计的.exe文件,是当前最为盛行的安装程序.在运行该Setup文件进行软件安装时,Setup除了进行复制.改名.解压和目录维护等基本安装工作外, ...
- hdu3333(线段树)
区间更新,单点查询. hdu3333 #include <iostream> #include <stdio.h> #include <string.h> #inc ...
- [ionic开源项目教程] - 第6讲 过滤器filter的使用
过滤器filter的使用 1.回顾 再熟悉一下tab1.html的代码: <div class="list"> <a ng-repeat="item i ...