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. 使用OPENROWSET(BULK...)从平面文件加载数据

    要使用OPENROWSET首先要开启一个configure选项 sp_configure ‘show advanced options’, 1;GORECONFIGURE;GOsp_configure ...

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

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

  3. shell脚本学习笔记

    1.判断符号:中括号[ ] [ ]进行数据的判断,例如我想知道HOME这个变量是否为空,[ -z "$HOME" ],或者两个字符串是否相等,[ "$HOME" ...

  4. Flex通过Blazeds利用Remoteservice与后台java消息推送

    http://www.cnblogs.com/xia520pi/archive/2012/05/26/2519343.html http://computerdragon.blog.51cto.com ...

  5. 自动化测试LoadRunner

    这个地址应该比较的好下载,以前找的地址都是需要输入一些相关的信息.这个只需要有一个HP的注册账号就可下载,记下来.以备后用: 下载地址: http://www8.hp.com/us/en/softwa ...

  6. BZOJ 3172 单词(ac自动机)

    题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=3172 题意:给出n个单词.输出每个单词在所有单词中一共出现多少次? 思路:首先将所有单词 ...

  7. MongoDB 学习笔记(四)C# 操作MongoDB

    C#驱动对mongodb的操作,目前驱动有两种:官方驱动和samus驱动,不过我个人还是喜欢后者, 因为提供了丰富的linq操作,相当方便. 官方驱动:https://github.com/mongo ...

  8. 【温故知新】C#委托delegate

    在c#的学习过程中,学到委托与事件总会迷糊一段时间,迷糊过后自然而就似懂非懂了~,所以最近我打算把以前所学的迷糊过的知识总结,温故知新,总结记录下来. 首先,我们来看一下msdn对委托的定义: del ...

  9. CSS_简介/语法结构/长度单位/应用方式/标签的样式重置/表单样式重置

    一.CSS简介:  w3c(World Wide Web Consortium):万维网联盟,是规定网页标准的一个组织(叫做Web标准) Web标准:是由w3c和其他标准化组织制定的一系列标准的集合, ...

  10. HTML的列表标签

    一.上下层列表标签:<dl>..</dl>: 上层dt 下层dd:封装的内容会被自动缩进的效果 <dl> <dt>运动户外</dt> < ...