Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_value(self, locator)
def get_selected_list_value(self, locator):
"""Returns the value of the selected element from the select list identified by `locator`. Return value is read from `value` attribute of the selected element. 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 = self._get_select_list(locator)
return select.first_selected_option.get_attribute('value')
方法名:get_selected_list_value(self, locator)
相似方法:
公共方法 返回首个选中项的value数组
接收参数:locator
10行:使用_get_select_list(self, locator)方法,返回Select对象
13行:返回首个选中项的value数组
使用:
输出结果:
INFO : ${value} = 0
Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_value(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 ...
随机推荐
- [itint5]最短路径遍历点
http://www.itint5.com/oj/#50 此题有点难,参考了这篇文章,是个两条路的DP: http://blog.csdn.net/a83610312/article/details/ ...
- 什么是struts2?
一.我对struts2的理解. 1.struts2 是一个按MVC模式设计放入web层框架,其实它就是一个servlet.这个servlet命名为ActionServlet,或者是它的一个子类.它的工 ...
- ISO9000与ISO9001的区别
很多人询问ISO9000和ISO9001的区别在哪里,其实这是一个概念上的误解. ISO9001是ISO9000族标准所包括的一组质量管理体系核心标准之一.ISO9000族标准是国际标准化组织(ISO ...
- SQL查询(笔记2——实体查询)
SQL查询(笔记2——实体查询) 二.实体查询 如果查询返回了某个数据表的全部数据列,且该数据表有对应的持久化类映射,我们就把查询结果转换成实体查询.将查询结果转换成实体,可以使用SQLQuery提供 ...
- ConcurrentHashMap使用示例
ConcurrentHashMap使用示例 发表于2年前(2013-07-12 19:05) 阅读(3660) | 评论(0) 25人收藏此文章, 我要收藏 赞5 如何快速提高你的薪资?-实力拍“ ...
- mongodb 常见操作转
Ø Collection聚集集合 1.创建一个聚集集合(table) db.createCollection(“collName”, {size: 20, capped: 5, max: 100}); ...
- JNI读取assets资源文件
源自:http://www.rosoo.net/a/201112/15459.html assets目录底下的文件会被打包到一个apk文件里,这些资源在安装时他们并没被解压,使用时是直接从apk中读取 ...
- 网站TCP链接暴增
昨天上线后,TCP链接暴增,红点增多. 问题在查.其中有一部分,多线程修改,突破了线程数 64的限制.线程内,会发起网络请求. 怀疑是热点之一.其他的部分也有修改,也被怀疑.准备下次,2部分分开上线. ...
- [Codeforces673C]Bear and Colors(枚举,暴力)
题目链接:http://codeforces.com/contest/673/problem/C 题意:给一串数,不同大小的区间内出现次数最多的那个数在计数的时候会+1,问所有区间都这样计一次数,所有 ...
- Android studio中Rendering Problems不能可视化操作的解决办法
出现:Rendering Problems the following classes could not be found:android.support.v7.internal.widget.Ac ...