当前位置:网站首页>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
边栏推荐
- Code Interview Guide for Programmers CD15 Generating an Array of Windowed Maximums
- 程序员代码面试指南 CD15 生成窗口最大值数组
- 混合型界面:对话式UI的未来
- pytroch、tensorflow对比学习—搭建模型范式(构建模型方法、训练模型范式)
- typescript23-元组
- (2022 Niu Ke Duo School IV) K-NIO's Sword (Thinking)
- LeetCode 387. 字符串中的第一个唯一字符
- LeetCode 27. 移除元素
- API设计笔记:pimpl技巧
- Robot_Framework: commonly used built-in keywords
猜你喜欢

y83. Chapter 4 Prometheus Factory Monitoring System and Actual Combat -- Advanced Prometheus Alarm Mechanism (14)

程序员代码面试指南 CD15 生成窗口最大值数组

pytroch、tensorflow对比学习—搭建模型范式(构建模型方法、训练模型范式)

Selenium:操作Cookie

风险策略调优中重要的三步分析法

UE4 rays flashed from mouse position detection

Risk strategy important steps of tuning method

typescript24-类型推论

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

Logitech Mouse Experience Record
随机推荐
MySQL实践总结-
文件的异步读写
safari浏览器怎么导入书签
状态压缩dp
Li Chi's work and life summary in July 2022
y83. Chapter 4 Prometheus Factory Monitoring System and Actual Combat -- Advanced Prometheus Alarm Mechanism (14)
UE4 rays flashed from mouse position detection
Selenium: form switching
JWL-11/2-99.9A电流继电器
Lawyer Interpretation | Guns or Roses?Talking about Metaverse Interoperability from the Battle of Big Manufacturers
请问shake数据库中想把源的db0的数据同步到目的db5,参数怎么设置呢?
Check控件
Typescript20 - interface
typescript23-tuple
Selenium:简介
The difference between scheduleWithFixedDelay and scheduleAtFixedRate
vim配置+ctag像source insight一样方便阅读代码
Seleniu:元素常用操作
「以云为核,无感极速」顶象第五代验证码
2022年超全的Android面经(附含面试题|进阶资料)