当前位置:网站首页>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
边栏推荐
- typescript24-类型推论
- UE4 从鼠标位置射出射线检测
- 产品经理访谈 | 第五代验证码的创新与背景
- The method of solving stored procedure table name passing through variable in mysql
- PaddleX部署推理模型和GUI界面测试结果不一致的解决方法
- typescript20-接口
- typescript21-接口和类型别名的对比
- 数据比对功能调研总结
- [target detection] YOLOv7 theoretical introduction + practical test
- 力扣(LeetCode)212. 单词搜索 II(2022.07.31)
猜你喜欢
数组问题之《两数之和》以及《三数之和 》
56:第五章:开发admin管理服务:9:开发【文件上传到,MongoDB的GridFS中,接口】;(把文件上传到GridFS的SOP)
Lawyer Interpretation | Guns or Roses?Talking about Metaverse Interoperability from the Battle of Big Manufacturers
初识shell脚本
[target detection] YOLOv7 theoretical introduction + practical test
Optional parameters typescript19 - object
pytroch、tensorflow对比学习—搭建模型范式(构建模型方法、训练模型范式)
Dry goods!How to Construct SRv6-TE Performance Test Environment Using Instrumentation
剑指 Offer 68 - I. 二叉搜索树的最近公共祖先
typescript25 - type assertion
随机推荐
挑战52天背完小猪佩奇(第01天)
pytorch、tensorflow对比学习—计算图和微分机制
safari浏览器怎么导入书签
25. Have you been asked these three common interview questions?
初识shell脚本
LeetCode 387. 字符串中的第一个唯一字符
(2022 Nioke Duo School IV) D-Jobs (Easy Version) (3D prefix or)
pytroch、tensorflow对比学习—功能组件(数据管道、回调函数、特征列处理)
MySQL-Data Operation-Group Query-Join Query-Subquery-Pagination Query-Joint Query
4D line-by-line analysis and implementation of Transformer, and German translation into English (3)
pytorch、tensorflow对比学习—功能组件(优化器、评估指标、Module管理)
7 行代码搞崩溃 B 站,原因令人唏嘘!
Swastika line-by-line parsing and realization of the Transformer, and German translation practice (2)
pytorch、tensorflow对比学习—张量
Optional parameters typescript19 - object
scheduleWithFixedDelay和scheduleAtFixedRate的区别
报错:AttributeError: module ‘matplotlib’ has no attribute ‘figure’
(2022牛客多校四)N-Particle Arts(思维)
用控件当画笔获得bitmap代码记录
typescript25-类型断言