当前位置:网站首页>Selenium: mouse, keyboard events
Selenium: mouse, keyboard events
2022-08-01 05:08:00 【Mouse A who is not afraid of cats】
Mouse events
1. The method click(), which simulates the "left click" of the mouse in Selenium, was introduced earlier. This method alone is not enough.Current Web products provide richer mouse interaction methods
⑴ ⑴ For example, functions such as right-click, double-click, hover, drag, etc.
⑵ Similarly, Selenium also provides corresponding methods to simulate these miceAction
2. In WebDriver, these methods of mouse operation are encapsulated in the ActionChains class.
⑴The first letter of the class name ActionChains needs to be capitalized
3. The mouse method under the ActionChains class needs to instantiate an ActionChains object before use, and finally use the perfrom() method to submit the action
⑴ ⑴Use the ActionChains object to call the mouse method under it
Perform action
1. Method name: perfrom()
2. The reason why this method should be introduced first is because the function of this method is to execute all the actions stored in ActionChains, which can be understood as the submission action for the entire operation
⑴ ⑴ That is to say : All mouse methods in the ActionChains class need to be submitted through this method
3. When the ActionChains class method (mouse operation method) is called, it will not be executed immediately, but all operations will be stored in a queue. When the perform() method is called, the operations in the queue will be executed sequentially
⑴ can be understood as the submission of mouse events
4. This method is used in combination with other mouse methods, so it will be demonstrated in the following examples
Left mouse click
边栏推荐
- [target detection] YOLOv7 theoretical introduction + practical test
- Selenium:上传、下载文件
- mysql中解决存储过程表名通过变量传递的方法
- 数据比对功能调研总结
- TIM登陆时提示00001(TIM00001)
- 文件的异步读写
- Selenium:元素定位
- The method of solving stored procedure table name passing through variable in mysql
- (2022牛客多校四)D-Jobs (Easy Version)(三维前缀或)
- 备战金九银十,如何顺利通过互联网大厂Android的笔面试?
猜你喜欢

数组问题之《下一个排列》、《旋转图像》以及二分查找之《搜索二维矩阵》

UE4 模型OnClick事件不生效的两种原因

High Numbers | 【Re-integration】Line Area Score 880 Examples

Lawyer Interpretation | Guns or Roses?Talking about Metaverse Interoperability from the Battle of Big Manufacturers

PaddleX部署推理模型和GUI界面测试结果不一致的解决方法

(2022 Niu Ke Duo School IV) K-NIO's Sword (Thinking)

2022年超全的Android面经(附含面试题|进阶资料)

(2022牛客多校四)A-Task Computing (排序+动态规划)

pytroch、tensorflow对比学习—使用GPU训练模型

Typescript20 - interface
随机推荐
Logitech Mouse Experience Record
pytorch、tensorflow对比学习—张量
Robot_Framework:常用内置关键字
零序电流继电器器JL-8C-12-2-2
vim配置+ctag像source insight一样方便阅读代码
II. Binary tree to Offer 68 - recent common ancestor
56:第五章:开发admin管理服务:9:开发【文件上传到,MongoDB的GridFS中,接口】;(把文件上传到GridFS的SOP)
typescript20-接口
NDK does not contain any platforms问题解决
状态压缩dp
关于给Qt做一个软件初始化的进度条
Power button (LeetCode) 212. The word search II (2022.07.31)
Dry goods!How to Construct SRv6-TE Performance Test Environment Using Instrumentation
[MySQL] 多表查询
typescript24-类型推论
PaddleX部署推理模型和GUI界面测试结果不一致的解决方法
请问shake数据库中想把源的db0的数据同步到目的db5,参数怎么设置呢?
Excuse me, only primary key columns can be queried using sql in table storage. Does ots sql not support non-primary keys?
冲刺金九银十,Android开发面试(内含面试资料|面试题|源码)
剑指 Offer 68 - II. 二叉树的最近公共祖先