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)的更多相关文章

  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(self, locator, *items)

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

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

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

  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入门:方法的使用

    [修饰符]返回值类型 方法名 (形式参数表){ 程序代码; return 返回值; } 例子: public class Test { //方法一 public static void printIn ...

  2. [iOS]ios archives 出现的是other items而不是iOS Apps的解决方案

    百度了一上午, 总是这样子. (利用cocoapods上传项目的时候, 总是这样无法点击UpLoad to App Store) 然后. 这样做. 就可以了!

  3. iOS:VFL语言

    VFL语言   介绍: 什么是VFL语言? VFL全称是Visual Format Language,翻译过来是“可视化格式语言” VFL是苹果公司为了简化Autolayout的编码而推出的抽象语言 ...

  4. Write operations are not allowed in read-only mode

    使用Spring提供的Open Session In View而引起Write operations are not allowed in read-only mode (FlushMode.NEVE ...

  5. AES加密和解密

    using System; using System.Security.Cryptography; using System.Text; using System.IO; namespace AES ...

  6. c++异常 连续抛出异常

      今天天遇到这样一个问题,连续两次抛出异常,但是只有一个catch,会导致core这个时候会导致core, 单线程编程中可能很少遇到这样的问题,但是多线程中是很容易遇到的, 举个例子:catch代码 ...

  7. dojo 总结

    对以前项目中用到的dojo框架进行一个框架式的总结,以备参考学习. 主要组成... 1 开发注意... 3 Dojo代码约定... 3 Dojo形式的脚本库... 4 Dojo Build. 4 Do ...

  8. java.lang.NoSuchFieldError: VERSION_2_3_0 报错解决方案

    java.lang.NoSuchFieldError: VERSION_2_3_0 at org.apache.struts2.views.freemarker.FreemarkerManager.c ...

  9. Redstone 云观象台 服务器部署 - Nginx配置文件

    以下信息仅针对Redstone的Ngxin配置文件进行更新. web服务器Nginx配置文件结构如下: /etc/nginx/nginx.conf # For more information on ...

  10. mvp(1)简介及它与mvc区别

    注意:它们是软件架构,不是设计模式 左边mvc    右边mvp MVC和MVP的区别? MVP 是从经典的MVC架构演变而来,它们的基本思想有相通的地方:Controller/Presenter负责 ...