zoukankan      html  css  js  c++  java
  • webDriver API——第13部分UI Support

    class selenium.webdriver.support.select.Select(webelement)
    deselect_all()

    Clear all selected entries. This is only valid when the SELECT supports multiple selections. throws NotImplementedError If the SELECT does not support multiple selections

    deselect_by_index(index)

    Deselect the option at the given index. This is done by examing the “index” attribute of an element, and not merely by counting.

    Args:
    • index - The option at this index will be deselected
    deselect_by_value(value)

    Deselect all options that have a value matching the argument. That is, when given “foo” this would deselect an option like:

    <option value=”foo”>Bar</option>
    Args:
    • value - The value to match against
    deselect_by_visible_text(text)

    Deselect all options that display text matching the argument. That is, when given “Bar” this would deselect an option like:

    <option value=”foo”>Bar</option>

    Args:
    • text - The visible text to match against
    select_by_index(index)

    Select the option at the given index. This is done by examing the “index” attribute of an element, and not merely by counting.

    Args:
    • index - The option at this index will be selected
    select_by_value(value)

    Select all options that have a value matching the argument. That is, when given “foo” this would select an option like:

    <option value=”foo”>Bar</option>

    Args:
    • value - The value to match against
    select_by_visible_text(text)

    Select all options that display text matching the argument. That is, when given “Bar” this would select an option like:

    <option value=”foo”>Bar</option>
    Args:
    • text - The visible text to match against
    all_selected_options

    Returns a list of all selected options belonging to this select tag

    first_selected_option

    The first selected option in this select tag (or the currently selected option in a normal select)

    options

    Returns a list of all options belonging to this select tag

    class selenium.webdriver.support.wait.WebDriverWait(drivertimeoutpoll_frequency=0.5ignored_exceptions=None)

    Bases: object

    until(methodmessage='')

    Calls the method provided with the driver as an argument until the return value is not False.

    until_not(methodmessage='')

    Calls the method provided with the driver as an argument until the return value is False.

  • 相关阅读:
    MyCat 概念与配置
    使用zookeeper管理远程MyCat配置文件、MyCat监控、MyCat数据迁移(扩容)
    数据库分库分表中间件MyCat的安装和mycat配置详解
    搭建dubbo+zookeeper+dubboadmin分布式服务框架(windows平台下)
    数据库分库分表的类型和特点
    数据库为什么要分库分表
    正确安装MySQL5.7 解压缩版(手动配置)方法
    SQL 查询相同记录下日期最大的一条数据
    HashMap在Jdk1.7和1.8中的实现
    Spring Bean的生命周期
  • 原文地址:https://www.cnblogs.com/hushaojun/p/4467668.html
Copyright © 2011-2022 走看看