当前位置:网站首页>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
边栏推荐
- (2022 Niu Ke Duo School IV) N-Particle Arts (Thinking)
- PaddleX部署推理模型和GUI界面测试结果不一致的解决方法
- typescript25 - type assertion
- 力扣(LeetCode)212. 单词搜索 II(2022.07.31)
- LeetCode 387. 字符串中的第一个唯一字符
- vim配置+ctag像source insight一样方便阅读代码
- Li Chi's work and life summary in July 2022
- Selenium:上传、下载文件
- Code Interview Guide for Programmers CD15 Generating an Array of Windowed Maximums
- pytroch、tensorflow对比学习—使用GPU训练模型
猜你喜欢
随机推荐
LeetCode 231. 2 的幂
y83.第四章 Prometheus大厂监控体系及实战 -- prometheus告警机制进阶(十四)
Swastika line-by-line parsing and realization of the Transformer, and German translation practice (2)
Asynchronous reading and writing of files
typescript27-枚举类型呢
typescript27 - what about enumeration types
RSA主要攻击方法
typescript22-接口继承
Robot_Framework:常用内置关键字
mysql中解决存储过程表名通过变量传递的方法
typescript21-接口和类型别名的对比
文件的异步读写
移动应用恶意攻击激增500% 三六零天御为APP免费构建安全屏障
I met a shell script
25. Have you been asked these three common interview questions?
万字逐行解析与实现Transformer,并进行德译英实战(三)
(2022牛客多校四)H-Wall Builder II(思维)
Typescript20 - interface
Pyspark机器学习:向量及其常用操作
冲刺金九银十,Android开发面试(内含面试资料|面试题|源码)









