def unselect_from_list_by_value(self, locator, *values):
"""Unselects `*values` 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 values:
raise ValueError("No value given.")
items_str = "value(s) '%s'" % ", ".join(values)
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 value in values:
select.deselect_by_value(value)

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

相似方法:

公共方法 移除所给values的选中状态

接收参数:locator,values

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

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

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

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

  2. Selenium2Library系列 keywords 之 _SelectElementKeywords 之 select_from_list_by_label(self, locator, *labels)

    def select_from_list_by_label(self, locator, *labels): """Selects `*labels` from list ...

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

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

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

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

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

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

  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,jsp,j2ee软件工程师笔试中可能出现的问题

    相信大家应聘的时候第一关就是笔试,即使是一位很有经验的工程师也不一定能够顺利通过,笔试不好,可能就无法进行面试,即使能够进行面试,考官对你的印象也不会很好,问的问题也会很多,估计很难吃的消,当然如果你 ...

  2. POJ3252——Round Number(组合数学)

    Round Numbers DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to pla ...

  3. Android消息机制之实现两个不同线程之间相互传递数据相互调用

    目的:实现两个不同线程之间相互传递数据相互调用方法. 线程一中定义mainHandler 并定义一个方法mainDecode 线程二中定义twoHandler 并定义一个方法twoEncode 实现当 ...

  4. WebMvcConfigurerAdapter

    spring Boot 默认的处理方式就已经足够了,默认情况下Spring Boot 使用WebMvcAutoConfiguration中配置的各种属性. 建议使用Spring Boot 默认处理方式 ...

  5. Java并发编程知识总结

    一.线程 1.线程创建: 继承Thread类创建线程类 实现Runnable接口创建线程类 使用Callable和Future创建线程 Runnable是执行工作的独立任务,但是它不返回任何值,如果希 ...

  6. Java实体书写规范

    ** * 用户角色表 */ public class BaseUserRole implements Serializable { private static final long serialVe ...

  7. Java面试汇总

    转自:http://zy19982004.iteye.com/blog/1846537#comments 一.All 最近找工作,遇到的笔试面试题,归纳如下,供大家参考. 二.J2SE 容器 Hash ...

  8. 将Android Studio工程导入到Eclipse中

    1.前言 studio项目中src/main/java目录里面的代码对应的是eclispe项目中的src目录中的代码. 而studio中src目录里面包括整个项目的所有代码包括资源文件和xml. 2. ...

  9. leetcode:Remove Linked List Elements

    Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --& ...

  10. Java中的private、protected、public和default的区别

        (1)对于public修饰符,它具有最大的访问权限,可以访问任何一个在CLASSPATH下的类.接口.异常等.它往往用于对外的情况,也就是对象或类对外的一种接口的形式. (2)对于protec ...