Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_values(self, locator)
def get_selected_list_values(self, locator):
"""Returns the values of selected elements (as a list) from the select list identified by `locator`. Fails if there is no selection. Select list keywords work on both lists and combo boxes. Key attributes for
select lists are `id` and `name`. See `introduction` for details about
locating elements.
"""
select, options = self._get_select_list_options_selected(locator)
if len(options) == 0:
raise ValueError("Select list with locator '%s' does not have any selected values")
return self._get_values_for_options(options)
方法名:get_selected_list_values(self, locator)
相似方法:
公共方法 返回所有选中项的values数组
接收参数:locator
10行:使用_get_select_list_options_selected(self, locator)方法返回Select 元素对象和选中options数组
13行:返回所有选中项的value数组
使用:
输出结果:
INFO : @{values} = [ 0 | 1 | 2 ]
Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_values(self, locator)的更多相关文章
- 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 ...
随机推荐
- jackson基于注解的简单使用
Jackson提供了一系列注解,方便对JSON序列化和反序列化进行控制,下面介绍一些常用的注解. 1.@JsonIgnore 此注解用于属性上,作用是进行JSON操作时忽略该属性. 2.@JsonFo ...
- BZOJ 3720 gty的妹子树
块状树裸题 块状树: 首先对树进行分块,分出的每一块都是一个连通块 通常的分块的方式如下: 1.父亲所在块不满,分到父亲所在块中 2.父亲所在块满,自己单独开一个块 (貌似有更为优越的分块方式? 注意 ...
- lintcode 中等题:Max Points on a Line 最多有多少个点在一条直线上
题目 最多有多少个点在一条直线上 给出二维平面上的n个点,求最多有多少点在同一条直线上. 样例 给出4个点:(1, 2), (3, 6), (0, 0), (1, 3). 一条直线上的点最多有3个. ...
- python学习[一]
Vamei写了很好的python教程,感谢:http://www.cnblogs.com/vamei/archive/2012/09/13/2682778.html 摘录笔记 print命令行模式: ...
- Hibernate逍遥游记-第5章映射一对多-02双向(<set>、<key>、<one-to-many>、inverse、cascade="all-delete-orphan")
1. <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hi ...
- ISO9001、ISO14001、OHSAS18000什么意思
ISO9001是ISO9000族标准所包括的一组质量管理体系核心标准之一.ISO9000族标准是国际标准化组织(ISO)在1994年提出的概念,是指“由ISO/TC176(国际标准化组织质量管理和质量 ...
- PowerDesigner中转换物理模型时的命名转换
原文:PowerDesigner中转换物理模型时的命名转换 最近在使用PowerDesigner建模数据库,在使用中积累了一些遇到的问题和解决办法,记录下来,希望对遇到同样问题的朋友有所帮助. 早 期 ...
- jQuery-瀑布流-浮动布局(一
jQuery-瀑布流-浮动布局(一)(延迟AJAX加载图片) 瀑布流:这种布局适合于小数据块,每个数据块内容相近且没有侧重.通常,随着页面滚动条向下滚动,这种布局还会不断加载数据块并附加至当前尾部 ...
- php-resque 任务队列
php-resque License : MIT Source Code Allo点评:php-resque是Ruby项目resque在php下的实现.虽然Gearman也是一个不错的选择,但是res ...
- Eclipse - FindBugs Plugin 的安装和使用
Eclipse - FindBugs Plugin 的安装和使用 FindBugs is a static analysis tool that examines the classes in se ...