当前位置:网站首页>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年7月工作生活总结
- Selenium:上传、下载文件
- typescript20-接口
- 56:第五章:开发admin管理服务:9:开发【文件上传到,MongoDB的GridFS中,接口】;(把文件上传到GridFS的SOP)
- 25. 这三道常见的面试题,你有被问过吗?
- 类神经网络训练不起来怎么办
- What should I do if the neural network cannot be trained?
- API设计笔记:pimpl技巧
- Li Chi's work and life summary in July 2022
- 2022/07/29 入职健海JustFE团队,我学到了高效开发(年中总结)
猜你喜欢

高数 | 【重积分】线面积分880例题

MySQL-DML language-database operation language-insert-update-delete-truncate

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

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

移动应用恶意攻击激增500% 三六零天御为APP免费构建安全屏障

typescript24 - type inference

pytroch、tensorflow对比学习—搭建模型范式(低阶、中阶、高阶API示例)

typescript23-元组

中国的机器人增长

产品经理访谈 | 第五代验证码的创新与背景
随机推荐
25. Have you been asked these three common interview questions?
56:第五章:开发admin管理服务:9:开发【文件上传到,MongoDB的GridFS中,接口】;(把文件上传到GridFS的SOP)
LeetCode 1189. “气球” 的最大数量
ModuleNotFoundError: No module named 'tensorflow.keras' error message solution
LeetCode 231. 2 的幂
力扣(LeetCode)212. 单词搜索 II(2022.07.31)
2022年湖南工学院ACM集训第六次周测题解
Selenium:操作JS
(2022牛客多校四)N-Particle Arts(思维)
Excuse me, only primary key columns can be queried using sql in table storage. Does ots sql not support non-primary keys?
华为Android开发面试后得出的面试秘诀
挑战52天背完小猪佩奇(第01天)
Pyspark机器学习:向量及其常用操作
Asynchronous reading and writing of files
Dry goods!How to Construct SRv6-TE Performance Test Environment Using Instrumentation
用控件当画笔获得bitmap代码记录
(2022 Niu Ke Duo School IV) K-NIO's Sword (Thinking)
pytorch、tensorflow对比学习—张量
程序员代码面试指南 CD15 生成窗口最大值数组
Challenge 52 days to memorize Peppa Pig (Day 01)