当前位置:网站首页>Selenium: JS operation
Selenium: JS operation
2022-08-01 05:10:00 【Mouse A who is not afraid of cats】
JavaScript
1. JavaScript is the programming language of the Web, and all modern HTML pages will use JavaScriptp>
2. A complete web page is composed of HTML, CSS, JavaScript, etc.
⑴HTML: equivalent to the skeleton, which determines the basic structure of the web page
⑵CSS: equivalent to the performance, determines the presentation form of the web page
⑶JavaScript: equivalent to action, determines what the web page can do
3. Compare a webpage to a person
⑴HTML is the person's skeleton (determines the person's frame)
⑵CSS is the person's skin, hair, etc. (determines the person's appearance)
⑶ JavaScript is the action of this person (raise hand, kick, etc.)
Operating JS in Selenium
1. WebDriver simulates the operation of end users, that is to say, the operation (actual operation) that the user can complete under normal circumstances can be simulated through the API provided by WebDriver
2, but in actual WEB applications, not all elements can be operated by users, so using WebDriver can not directly simulate operations; or WebDriver does not provide interface methods for corresponding operations
⑴ Elements are written in JSThe
⑵ Element is invisible
⑶ Element cannot be clicked
⑷ Modify element attributes (WebDriver does not provide the corresponding interface method)
⑸ Browser scroll bar (WebDriver does not provide the corresponding interfacemethod)
3. In these cases, we can execute JavaScript code through WebDriver to achieve the purpose of manipulating (clicking or executing) elements
⑴ Execute JavaScript statements through WebDriver to interact with JavaScript in Web pages.So what JavaScript can do, Se
边栏推荐
- (2022牛客多校四)N-Particle Arts(思维)
- Power button (LeetCode) 212. The word search II (2022.07.31)
- 请问shake数据库中想把源的db0的数据同步到目的db5,参数怎么设置呢?
- Dry goods!How to Construct SRv6-TE Performance Test Environment Using Instrumentation
- 初识shell脚本
- typescript25 - type assertion
- [target detection] YOLOv7 theoretical introduction + practical test
- Robot_Framework: commonly used built-in keywords
- Selenium: mouse, keyboard events
- 请问表格储存中用sql只能查询到主键列,ots sql非主键不支持吗?
猜你喜欢
typescript19-对象可选参数
state compressed dp
零序电流继电器器JL-8C-12-2-2
pytroch、tensorflow对比学习—功能组件(数据管道、回调函数、特征列处理)
typescript21 - Comparison of Interfaces and Type Aliases
Typescript20 - interface
USB3.0:VL817Q7-C0的LAYOUT指南(三)
MySQL-DML语言-数据库操作语言-insert-update-delete-truncate
typescript21-接口和类型别名的对比
备战金九银十,如何顺利通过互联网大厂Android的笔面试?
随机推荐
4D line-by-line analysis and implementation of Transformer, and German translation into English (3)
UE4 从鼠标位置射出射线检测
(Codeforce 757) E. Bash Plays with Functions
LeetCode 9. 回文数
USB3.0:VL817Q7-C0的LAYOUT指南(三)
Robot_Framework:关键字
(Codeforce 757)E. Bash Plays with Functions(积性函数)
(2022牛客多校四)D-Jobs (Easy Version)(三维前缀或)
律师解读 | 枪炮还是玫瑰?从大厂之争谈元宇宙互操作性
NDK does not contain any platforms问题解决
Immutable
文件的异步读写
UE4 模型OnClick事件不生效的两种原因
MySQL实践总结-
56:第五章:开发admin管理服务:9:开发【文件上传到,MongoDB的GridFS中,接口】;(把文件上传到GridFS的SOP)
备战金九银十,如何顺利通过互联网大厂Android的笔面试?
typescript28 - value of enumeration type and data enumeration
Immutable
剑指 Offer 68 - I. 二叉搜索树的最近公共祖先
(2022牛客多校四)A-Task Computing (排序+动态规划)