Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_label(self, locator, *labels)
def unselect_from_list_by_label(self, locator, *labels):
"""Unselects `*labels` 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 labels:
raise ValueError("No value given.")
items_str = "label(s) '%s'" % ", ".join(labels)
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 label in labels:
select.deselect_by_visible_text(label)
方法名:unselect_from_list_by_label(self, locator, *labels)
相似方法:
公共方法 移除所给labels的选中状态
接收参数:locator,labels
13行:使用_get_select_list(self, locator)方法,返回Select对象
Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_label(self, locator, *labels)的更多相关文章
- 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 之 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_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 ...
随机推荐
- Mysql Workbench 学习
1.安装 http://dev.mysql.com/downloads/tools/workbench/ 选择合适的,下载(以Ubuntu 为例) cd到下载目录,然后sudo dpkg -i wor ...
- Two Sigma OA
刚做了两道Two Sigma OA. 还是两道老题, Friend Cycle和Longest Chain. Friend Cycle可以用Union Find来做.优化的时候因为矩阵是沿对角线对称, ...
- PenetrationTest
一.渗透测试是什么 渗透测试(PenetrationTest)是对安全情况最客观.最直接的评估方式,主要是模拟黑客的攻击方法对系统和网络进行非破坏性质的攻击性测试,在保证整个渗透测试过程都在可以控制和 ...
- PowerDesigner中name和code取消自动关联
PowerDesigner中,如果修改了某个字段的name,其code也跟着修改,如果想取消,可以如下操作 解决方法如下: 1.选择Tools->GeneralOptions...菜单,出现Ge ...
- Docker —— 用于统一开发和部署的轻量级 Linux 容器【转】
转自:http://www.oschina.net/translate/docker-lightweight-linux-containers-consistent-development-and-d ...
- poj -1065 Wooden Sticks (贪心or dp)
http://poj.org/problem?id=1065 题意比较简单,有n跟木棍,事先知道每根木棍的长度和宽度,这些木棍需要送去加工,第一根木棍需要一分钟的生产时间,如果当前木棍的长度跟宽度 都 ...
- C盘空间不足
C盘空间不足 2014-11-27 Win7实用技巧之七实战C盘空间不足之三招四式
- leetcode:Coin Change
You are given coins of different denominations and a total amount of money amount. Write a function ...
- React学习、安装及QuickStart
首先看的是这个页面 http://www.cocoachina.com/webapp/20150721/12692.html 这里有个内容差不多的版本(精华版):http://www.cnblogs. ...
- Python3 学习第十二弹: 补充something
python中遇到 *keys, **keys的形式 其实 * 代表传递任意个无名字参数,这些参数通过Tuple访问 >>> def sum(*keys): ret= 0 for i ...