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 ...
随机推荐
- POJ1456 supermarket [堆]
题目传送门 Supermarket Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 15192 Accepted: 685 ...
- java原理—反射机制
http://www.cnblogs.com/forlina/archive/2011/06/21/2085849.html 一.什么是反射:反射的概念是由Smith在1982年首次提出的,主要是指程 ...
- [UOJ218]火车管理
建一棵答案线段树存栈顶值,两棵可持久化线段树分别存栈顶值和栈顶元素入栈时间 询问就直接在答案线段树上查,弹栈就用入栈时间在对应版本的可持久化线段树上查询即可,修改就是可持久化线段树的区间覆盖 以前一直 ...
- python基础之文件操作,函数
文件操作 +模式: r+t w+t a+t r+b w+b a+b 可读可写,其他功能与人,r,w,a相同 f.seek(offset,whence) 文件指针移动 offest的单 ...
- 查询续与ajax
查询分组 事例:统计不止一个作者的图书:(作者数量大于一) Book.objects.all().values('name').annotate(author_num=Count('authors__ ...
- [Luogu1843]奶牛晒衣服
题目大意: 你要晒n件衣服,第i件衣服有w[i]滴水, 每件衣服每秒钟会自然风干a滴水,将这件衣服放入烘干机中每秒钟会烘干a+b滴水. 一秒钟不可以拆开,问晒干所有的衣服至少要多少时间? 思路: 二分 ...
- go环境变量配置liteide配置
1.go环境变量配置 http://download.csdn.net/detail/defonds/9408855下载后直接安装如果都选默认就只要添加一个gopath就可以了 不是默认添加goroo ...
- [BZOJ1004](HNOI 2008) Cards
Description 小春现在很清闲,面对书桌上的N张牌,他决定给每张染色,目 前小春只有3种颜色:红色,蓝色,绿色.他询问Sun有多少种染色方案,Sun很快就给出了答案.进一步,小春要求染出Sr张 ...
- [转]MySQL更改用户密码
grant all privilegeson *.* to root@'localhost'identified by 'root'with grant option; grant all privi ...
- Codeforces Round #345 (Div. 2) B. Beautiful Paintings 暴力
B. Beautiful Paintings 题目连接: http://www.codeforces.com/contest/651/problem/B Description There are n ...