def select_from_list_by_label(self, locator, *labels):
"""Selects `*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("Selecting %s from list '%s'." % (items_str, locator)) select = self._get_select_list(locator)
for label in labels:
select.select_by_visible_text(label)

方法名:select_from_list_by_label(self, locator, *values)

相似方法:

公共方法 选中所有labels项

接收参数:locator,*labels

13行:使用_get_select_list(self, locator)方法,返回Select对象

Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_label(self, locator, *labels)的更多相关文章

  1. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_label(self, locator, *labels)

    def unselect_from_list_by_label(self, locator, *labels): """Unselects `*labels` from ...

  2. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_value(self, locator, *values)

    def unselect_from_list_by_value(self, locator, *values): """Unselects `*values` from ...

  3. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list_by_index(self, locator, *indexes)

    def unselect_from_list_by_index(self, locator, *indexes): """Unselects `*indexes` fro ...

  4. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 unselect_from_list(self, locator, *items)

    def unselect_from_list(self, locator, *items): """Unselects given values from select ...

  5. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_value(self, locator, *values)

    def select_from_list_by_value(self, locator, *values): """Selects `*values` from list ...

  6. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list(self, locator, *items)

    def select_from_list(self, locator, *items): """Selects `*items` from list identified ...

  7. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_should_have_no_selections(self, locator)

    def list_should_have_no_selections(self, locator): """Verifies select list identified ...

  8. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 list_selection_should_be(self, locator, *items)

    def list_selection_should_be(self, locator, *items): """Verifies the selection of sel ...

  9. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_values(self, locator)

    def get_selected_list_values(self, locator): """Returns the values of selected elemen ...

随机推荐

  1. java socket实现全双工通信

    java socket实现全双工通信 单工.半双工和全双工的定义 如果在通信过程的任意时刻,信息只能由一方A传到另一方B,则称为单工. 如果在任意时刻,信息既可由A传到B,又能由B传A,但只能由一个方 ...

  2. post提交/文件上传服务器修改

    第一步:修改在php5下POST文件大小的限制   1.编修php.ini   找到:max_execution_time = 30 ,这个是每个脚本运行的最长时间,单位秒,修改为: max_exec ...

  3. GitHub 教程 in Ubuntu

    Follow these steps to configure github if you are the first time to use Github 1. Sign up a username ...

  4. js中的cookie使用

    在网上找到的资料,收藏一下 function getCookies(name) { var arr = document.cookie.match(new RegExp("(^| )&quo ...

  5. [原]poj2243-Knight Moves-水bfs

    #include<iostream> #include<cstdio> #include<cstring> #include<queue> using ...

  6. hdoj - 1258 Sum It Up && hdoj - 1016 Prime Ring Problem (简单dfs)

    http://acm.hdu.edu.cn/showproblem.php?pid=1258 关键点就是一次递归里面一样的数字只能选一次. #include <cstdio> #inclu ...

  7. AOJ 0525 - Osenbei

    http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=50785 翻译:http://blog.csdn.net/acm_10000h ...

  8. Makefile简介

    1.源程序的编译在Linux下面,如果要编译一个C语言源程序,我们要使用GNU的gcc编译器. 下面我们以一个实例来说明如何使用gcc编译器.假设我们有下面一个非常简单的源程序(hello.c):in ...

  9. Node Security

    发一个很早之前做的一个小东西-安全管理软件-可以对U盘进行管理,对后台程序进行扫描.分析!

  10. MVC简捷调用EasyUI的datagrid

    一直想在项目中使用EasyUi的datagrid,但种种原因,没有实现. 这两天在开发一个项目中,愿望终于得以实现. 先看效果: 实现步骤是这样的: 1,在页面中画dataGrid,具体代码如下: & ...