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(driver, timeout, poll_frequency=0.5, ignored_exceptions=None)
-
Bases: object
- until(method, message='')
-
Calls the method provided with the driver as an argument until the return value is not False.
- until_not(method, message='')
-
Calls the method provided with the driver as an argument until the return value is False.
webDriver API——第13部分UI Support的更多相关文章
- webDriver API——第14部分Color Support
class selenium.webdriver.support.color.Color(red, green, blue, alpha=1) Bases: object Color conversi ...
- python+selenium自动化软件测试(第2章):WebDriver API
2.1 操作元素基本方法 前言前面已经把环境搭建好了,从这篇开始,正式学习selenium的webdriver框架.我们平常说的 selenium自动化,其实它并不是类似于QTP之类的有GUI界面的可 ...
- Selenium WebDriver Api 知识梳理
之前一直没有系统的梳理WebDriver Api的相关知识,今天借此机会整理一下. 1.页面元素定位 1.1.8种常用定位方法 # id定位 driver.find_element_by_id() # ...
- webdriver API study
This chapter cover all the interfaces of Selenium WebDriver. Recommended Import Style The API defini ...
- selenium初识(二)——之webdriver API
配置完的环境之后,我们先来写一个小脚本: # __Author__:"Jim_xie" from selenium import webdriver from time impor ...
- <译>Selenium Python Bindings 6 - WebDriver API
本章涉及Selenium WebDriver的所有接口. Recommended Import Style 推荐的导入风格如下: from selenium import webdriver 然后,你 ...
- Webdriver API (二)
(转载) 1.3 打开测试页面 对页面对测试,首先要打开被测试页面的地址(如:http://www.google.com),web driver 提供的get方法可以打开一个页面: // And no ...
- webdriver API中文文档
1.1 下载selenium2.0的lib包 http://code.google.com/p/selenium/downloads/list 官方UserGuide:http://seleniu ...
- 2.28 查看webdriver API
2.28 查看webdriver API(带翻译) 前言 前面都是点点滴滴的介绍selenium的一些api使用方法,那么selenium的api到底有多少呢?本篇就教大家如何去查看seleni ...
随机推荐
- Linux的文件描述符
(1).文件描述符的定义 文件描述符是内核为了高效管理已被打开的文件所创建的索引,用于指向被打开的文件,所有执行I/O操作的系统调用都通过文件描述符:文件描述符是一个简单的非负整数,用以表明每个被进程 ...
- 【解决问题】centOS 7 设置固定IP,无法上外网
使用Xenserver搭建服务器集群,在安装centOS时候,发现如果将服务器IP设置成为static ip,只能内网互通,无法上外网(ping www.baidu.com 失败) 网上搜索了一下,发 ...
- Xamarin iOS项目找不到模拟器
Xamarin iOS项目找不到模拟器 在Visual Studio中,突然找不到模拟器,并且项目提示试用期过期:Trial period has expired.出现这种情况,是由于苹果系统中Xam ...
- Codeforces Round #196 (Div. 1) 题解
(CF唯一不好的地方就是时差……不过还好没去考,考的话就等着滚回Div. 2了……) A - Quiz 裸的贪心,不过要用矩阵乘法优化或者直接推通式然后快速幂.不过本傻叉做的时候脑子一片混乱,导致WA ...
- 【20181023T1】战争【反向并查集】
题面 [错解] 好像是个树唉我真聪明 然后就开始树上乱搞 最后写了个O(过不了)的神奇算法 60pts [正解] 题目中只有删点而不加点,考虑倒过来并查集 维护一个并查集内的和顺手维护一下就好了 复杂 ...
- 雅礼集训DAY 6 T1 xmasdag
感谢gryz的mly大好人再次给我提供了题目和数据. 和昨晚那个题几乎一样,都是x^n最后转化成第二类斯特林数*阶乘*Σ(和路径长度有关的组合数),而因为组合数是可以利用Pascal公式实现O(1)递 ...
- 【贪心】 Codeforces Round #419 (Div. 1) A. Karen and Game
容易发现,删除的顺序不影响答案. 所以可以随便删. 如果行数大于列数,就先删列:否则先删行. #include<cstdio> #include<algorithm> usin ...
- bzoj 4401: 块的计数
4401: 块的计数 Description 小Y最近从同学那里听说了一个十分牛B的高级数据结构——块状树.听说这种数据结构能在sqrt(N)的时间内维护树上的各种信息,十分的高效.当然,无聊的小Y对 ...
- android 关于Make sure the plugin is properly configured问题的解决办法
这个问题引发的原因最初的报错是: [2013-10-14 10:01:58 - XXX] The connection to adb is down, and a severe error has o ...
- python基础之条件判断和循环
1.条件判断 age = 3 if age >= 18: print('adult') elif age >= 6: print('teenager') else: print('kid' ...