selenium Select用法笔记
- select_by value:参数为option中的value属性,例如:HTML代码中 <ignore_js_op>
,应该是value="volvo"这个值,所以应该为小写; - select_by_visible_text:参数为option的text值, <ignore_js_op>
,应该是红线标出部分的值,所以应该是大写; - Select(driver.find_element_by_name("isImportant")).select_by_visible_text(u"是")

- deselect_all(self)
| Clear all selected entries. This is only valid when the SELECT supports multiple selections.
| throws NotImplementedError If the SELECT does not support multiple selections
- select_by_index(self, 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
|
| throws NoSuchElementException If there is no option with specisied index in SELECT
- select_by_value(self, 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
|
| throws NoSuchElementException If there is no option with specisied value in SELECT
|
- select_by_visible_text(self, 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
|
| throws NoSuchElementException If there is no option with specisied text in SELECT
selenium Select用法笔记的更多相关文章
- python+selenium七:下拉框、选项框、select用法
# from selenium import webdriverfrom selenium.webdriver.common.action_chains import ActionChainsimpo ...
- Selenium Grid 学习笔记
Selenium Grid 学习笔记http://www.docin.com/p-765680298.html
- jquery中关于append()的用法笔记---append()节点移动与复制之说
jquery中关于append()的用法笔记---append()节点移动与复制之说 今天看一本关于jquery的基础教程,看到其中一段代码关于append()的一行,总是百思不得其解.于是查了查官方 ...
- html select用法总结
本文将介绍select 原生的常用方法,这些都是经过测试,兼容ie6到ie10,及chrome,火狐等,也就是说大部分浏览器都兼容.如果大家发现有不兼容的情况,可以跟我留言. 我们对基本的用法了如指掌 ...
- 网络通信 --> select()用法
select()用法 头文件 #include <sys/time.h> #include <sys/types.h> #include <unistd.h> 定义 ...
- 【Python爬虫】selenium基础用法
selenium 基础用法 阅读目录 初识selenium 基本使用 查找元素 元素互交操作 执行JavaScript 获取元素信息 等待 前进后退 Cookies 选项卡管理 异常处理 初识sele ...
- golang学习之select用法
早期的select函数是用来监控一系列的文件句柄,一旦其中一个文件句柄发生IO操作,该select调用就会被返回.golang在语言级别直接支持select,用于处理异步IO问题. select用法同 ...
- 数据库Oracle的select用法(部分)
Oracle的select用法(部分): 1.查询所有: select * from employees; 2.加上where子句:用选择限制行 select * from employees whe ...
- <自动化测试>之<selenium API 用法2>
不知道之前的selenium API 用法1,有没有去练习, 个人认为线性代码还是要靠敲的, 后面的模块化除了多敲还需要一定的编程思想去理解, 今天下午不是很忙就给来这儿补充点selenium api ...
随机推荐
- PHP与webserver【简书看到的】
很久以前,人们造出来一个机器人,它的英文名字叫web server,中文名叫网页服务器.(为了简写,下文称web server为server) server的工作很简单,就是做内容的分发. 初期的se ...
- LeetCode难度和面试频率(转)
转自:http://www.cnblogs.com/ywl925/p/3507945.html ID Question Diff Freq Data Structure Algorit ...
- request对数据进行编码的 才是导致乱码问题之一
1.此时服务器端接收到客户端提交来的post请求 2.request.getParameter("name")方法开始从请求中解析数据 并使用默认的编码 格式进行编码(ISO-88 ...
- Mac Java配置JAVA——HOME
命令行中输入: export JAVA_HOME=$(/usr/libexec/java_home)
- IHE PIX规范
IHE(Integrating Healthcare Enterprise) 集成医疗企业 IHE概念是由医学专家和广大医护工作者.相关政府部门.信息技术专家和企业共同发起的,目的是提供一种更好的方法 ...
- 【题解】NOI2009二叉查找树 + NOIP2003加分二叉树
自己的思维能力果然还是太不够……想到了这棵树所有的性质即中序遍历不变,却并没有想到怎样利用这一点.在想这道题的过程中走入了诸多的误区,在这里想记录一下 & 从中吸取到的教训(原该可以避免的吧) ...
- MySQL 创建一个简单的成绩管理系统
操作过程使用实验楼. 首先是创建一个数据库studentsystem,使用语句是: CREATE DATABASE studentsystem; 查看创建好的数据库的命令还是SHOW DATABAS ...
- HDU3038:How Many Answers Are Wrong(带权并查集)
How Many Answers Are Wrong Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Ja ...
- HDU 1394 Minimum Inversion Number(树状数组/归并排序实现
Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java ...
- CentOS下SVN服务器的搭建使用
转载自:http://ailurus.blog.51cto.com/4814469/1168481 SVN作为新一代代码版本管理工具,有很多优点,管理方便,逻辑明确,安全性高,代码一致性高.SVN数据 ...