Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_index(self, locator, *indexes)
def unselect_from_list_by_index(self, locator, *indexes):
"""Unselects `*indexes` from list identified by `locator` 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.
"""
if not indexes:
raise ValueError("No index given.") items_str = "index(es) '%s'" % ", ".join(indexes)
self._info("Unselecting %s from list '%s'." % (items_str, locator)) select = self._get_select_list(locator)
if not select.is_multiple:
raise RuntimeError("Keyword 'Unselect from list' works only for multiselect lists.") for index in indexes:
select.deselect_by_index(int(index))
方法名:unselect_from_list_by_index(self, locator, *indexes)
相似方法:
公共方法 移除所给indexes的选中状态
接收参数:locator,indexes
14行:使用_get_select_list(self, locator)方法,返回Select对象
Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_index(self, locator, *indexes)的更多相关文章
- 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(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 ...
随机推荐
- iOS:授权用户定位NSLocationManager的使用
请求用户批准定位: 在iOS8,要想获得用户的位置,必须经过用户批准授权 开发者可以在Info.plist中添加两个配置项 –NSLocationAlwaysUsageDescription –NSL ...
- .NET单例模式-------各种写法&&验证
.NET单例模式-------各种写法&&验证 前言 单例模式对大家来说都不陌生,也很容易搞懂其原理,本篇文章也不提供单例模式的详细原理解析,本篇文章的目的是展示在C#中单例模式的各种 ...
- [置顶] ArcGIS10.1完美破解步骤详细图文教程
ArcGIS软件安装其实都比较简单的,只要大家清楚每个步骤,顺序安装即可.但是安装过程要注意一些问题,license先安装,安装完成先停止服务,然后再安装desktop.完成后就是破解步骤了,很多同学 ...
- J2EE开发之常用开源项目介绍
主要就我所了解的J2EE开发的框架或开源项目做个介绍,可以根据需求选用适当的开源组件进行开发.主要还是以Spring为核心,也总结了一些以前web开发常用的开源工具和开源类库 1持久层: 1)Hibe ...
- 同步synchronized用法
今天在高人的指导下,对同步synchronized用法有了更高一层的理解,非常感谢他的无私奉献.在此把代码贴出来方便日后查阅. publicclass SfServlet { privatestati ...
- sql, plsql 总结
/* *====================================== basic sql ========================================== */ - ...
- Android App接入微信开放平台注意事项
一.Android第三方应用接入微信开放平台的注意事项: 1. 到微信开放平台官网申请正式的AppID(需通过审核),要填写包名.app签名的md5值.至于如何获取app签名信息,官方提供签名包apk ...
- 51nod1678 lyk与gcd
容斥定理所以可以用莫比乌斯函数来搞.逆向思维答案等于总和减去和他互质的.那么设f[i]=∑a[j] i|j.ans[i]=sum- ∑mo[j]*f[j] 跟bzoj2440那道题挺像的都是利用莫比乌 ...
- HDFS常用命令
HDFS 常用的文件操作命令 hdfs dfs -text /pub/20151019/1/4/gwmvod/mediags.moretv.com.cn/*.bz2 | wc -l hdfs dfs ...
- Sublime安装插件的方法
一:打开:工具--命令面板 二:输入:package,,选择下拉列表里提示的install package 三:输入需要安装的插件的名称,如:angularJS Less sass 回车即可安装, ...