[Selenium]如何通过Selenium实现Ctrl+click,即按住Ctrl的同时进行单击操作
【以下是不负责任的转载……】
在自动化测试的过程中,经常会出现这样的场景:
按住Ctrl的同时,进行单击操作,已达到多选的目的
Actions a = new Actions(driver);
a.keyDown(Keys.CONTROL).perform();
for(int i = 0;i<quantity;i++){
WebElement securityEl = securitiesList.get(i);
SeleniumUtil.scrollIntoView(driver, securityEl);
securityEl.click();
}
a.keyUp(Keys.CONTROL).perform();
[Selenium]如何通过Selenium实现Ctrl+click,即按住Ctrl的同时进行单击操作的更多相关文章
- Spring Tool Suite4(sts)复制粘贴卡顿(ctrl+v, ctrl+c)、按住ctrl也很卡
最近在看<Spring in Action, Fifth Edition>,下载了Spring Tool Suite4,在使用的过程中发现了一些问题: 只要在复制粘贴(ctrl+c, ct ...
- 鼠标上下滑动总是放大缩小页面,按住ctrl+0
鼠标上下滑动总是放大缩小页面,可能是ctrl键失灵了,幸好键盘有两个ctrl键,按住ctrl+0,页面就正常了,吓死宝宝了,~~~~(>_<)~~~~
- python+selenium 元素被定位到而且click()也提示执行成功,但是页面就是没有变化和跳转。
python+selenium 元素被定位到而且click()也提示执行成功,但是页面就是没有变化和跳转. 如果多次定位和click(),有时候会跳转. 我遇到很多次就是很郁闷,有人说,操作太快的,页 ...
- python + web自动化,点击不生效,提示“selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (117, 674)”
前言: 在做web自动化时,遇到一个缩放了浏览器比例的操作,从100%缩小到80%,再进行点击的时候,弹出报错信息,无法点击 selenium.common.exceptions.ElementCli ...
- Selenium Web 自动化 - Selenium(Java)环境搭建
Selenium Web 自动化 - Selenium(Java)环境搭建 2016-07-29 1 下载JDK JDK下载地址:http://www.oracle.com/technetwork/j ...
- Selenium Web 自动化 - Selenium常用API
Selenium Web 自动化 - Selenium常用API 2016-08-01 目录 1 对浏览器操作 1.1 用webdriver打开一个浏览器 1.2 最大化浏览器&关闭浏览器 ...
- Selenium WebDriver VS Selenium RC
WebDriver到底是什么? WebDriver是一个Web的自动化测试框架,它支持你执行你的测试用例在不同的浏览器上面,并不像Selenium一样只支持Firefox. WebDriv ...
- Selenium IDE和Selenium RC的安装
1 安装FireBug和FirePath 1.在火狐浏览器中,点击”添加附件”按钮,弹出”附加组件管理器”页面 2.在弹出页面中,输入“fireBug”,点击“搜索”按钮,弹出fireBu ...
- Selenium Tutorial (2) - Selenium IDE In Depth
Installing Firefox and Firebug Installing and Opening Selenium IDE Starting with test cases and test ...
随机推荐
- Build path entry is missing: config 引起的 The project: configwhich is referenced by the classpath, does not exist.
运行Junit的时候报错, The project: XXXX which is referenced by the classpath, does not exist. 在Java Build Pa ...
- Windows下使用Git Bash上传项目到GitHub
http://blog.csdn.net/qq_28304687/article/details/69959238?locationNum=8&fps=1
- Springboot+RestTemplate 简单使用
spring框架提供的RestTemplate类可用于在应用中调用rest服务,它简化了与http服务的通信方式,统一了RESTful的标准,封装了http链接, 我们只需要传入url及返回值 ...
- December 01st 2016 Week 49th Thursday
Life is a maze and love is a riddle. 生活是个迷宫,爱情是个谜语. I am lost in both. Can you provide me some guida ...
- SGU---105 水题
题目链接: https://cn.vjudge.net/problem/SGU-105 题目大意: 定义一个数列 1,12,123,1234,12345......12345678910,123456 ...
- python第十四课--排序及自定义函数之自定义函数(案例四)
整理:4中最常见的自定义函数模型1).无参无返回值2).无参有返回值3).有参无返回值4).有参有返回值 #定义无参无返回值自定义函数 def func1(): print('hello method ...
- VM下,装centos7系统,配置nginx的问题
一.流程 1.先安装nginx依赖的包 (1)yum install gcc-c++ (2)yum install -y pcre pcre-devel (3)yum install -y zlib ...
- js等比压缩上传
一.js文件,这个是封装过的,借用了网络上的代码然后修改的 (function(window,undefined){ var upload = function(){ this.init(); }; ...
- ansible--02
一.目录结构: 二.配置文件解析 1. Inventory:主机列表配置文档 2.ansible.cfg:可存放多地 2.1 ansible读取此conf的顺序:当前命令执行目录-- >用户家目 ...
- Linux - 搭建FastDFS分布式文件系统
1. FastDFS简介 说明:FastDFS简介部分的理论知识全部来自于博主bojiangzhou的 <用FastDFS一步步搭建文件管理系统>,在此感谢博主的无私分享.当然最最要感谢的 ...