selenium的webdriverAPI使用操作多项选择框内容_10_3.docx
来源:互联网 发布:直播软件apk 编辑:程序博客网 时间:2024/06/07 23:19
selenium的webdriverAPI使用操作多项选择框内容_10_3.docx
@Test
public void f() {
WebElementweb=driver.findElement(By.id("multiSelect"));
Selectselect=new Select(web);
select.selectByIndex(0);
System.out.println(select.getFirstSelectedOption().toString());
select.selectByIndex(1);
select.selectByIndex(2);
//取消多项选择的第二选择项
select.deselectByIndex(1);
//取消多项选择的所有已选择项
//select.deselectAll();
//遍历多项选择项并输出每一项的文本内容
for(WebElementw:select.getOptions()){
System.out.println(w.getText());
}
}
0 0
- selenium的webdriverAPI使用操作多项选择框内容_10_3.docx
- selenium webdriverapi
- 多项选择(CheckBox)的使用
- android GridView 的使用 实现多项选择
- 使用showOptionDialog显示多项选择框
- 单项选择RadioButton和多项选择CheckBox的使用
- 单项选择RadioButton和多项选择CheckBox的使用
- 互动的多项选择
- js的多项选择
- alterDialog的多项选择
- 多项选择框
- webdriverapi
- 支持多项选择的ExpandableListView
- Android的多项选择设计
- selenium操作选择列表
- 实现 ajax 多项选择框
- ASP获取复选框(多项选择)的值
- ASP获取复选框(多项选择)的值
- C++项目——基于QT的电梯仿真系统
- 归并排序
- 整了一个编程相关的导航
- STM32F746 利用HAL库编写串口驱动程序
- native2ascii命令详解
- selenium的webdriverAPI使用操作多项选择框内容_10_3.docx
- 1.7顺序输出1到100之间所有能被7整除的整数
- 并查集
- 005.PHP实现二分查找
- sdutacm-图结构练习——BFS——从起始点到目标点的最短步数
- 《嵌入式系统软硬件协同设计实战指南》第九章跑马灯实验补充
- Python学习笔记之python基础(一)
- xml ---dom4j
- 面积