当前位置:网站首页>Seleniu: Common operations on elements
Seleniu: Common operations on elements
2022-08-01 05:10:00 【Mouse A who is not afraid of cats】
Selenium element manipulation
1. In the process of using Selenium, it is not enough to just locate the element and operate the WebDriver object of the browser. More we need to operate an element
⑴ For example: to the input boxenter data, click buttons, etc.
2. After using the element positioning method to locate an element, find_element_by_* and other methods will return a WebElement object
(1) At this point, we can perform certain operations on this element according to some methods or attributes under the WebElement object
3. How do we actually use a web page (how to operate web page elements), and how should we operate it in Selenium
⑴ ⑴Need to distinguish what operations the elements may perform, and find the right way to operate
Common methods and properties of WebElement objects
1. The operations we often use in the actual use of the browser may be input and click operations
2, so here we first introduce the common methods and properties of the WebElement object
WebElement object methods
Input box operation
1. In the process of using Web pages, we often need to enter some data into some input boxes in order to send data to the server
2, Selenium also provides a corresponding interface, Used to simulate inputting data into the input box
⑴ ⑴WebElement object.send_keys(*value):Simulate the keyboard to input content into the input box
String
⑵WebElementObject.clear()
边栏推荐
- [target detection] YOLOv7 theoretical introduction + practical test
- MySQL-Data Operation-Group Query-Join Query-Subquery-Pagination Query-Joint Query
- USB3.0:VL817Q7-C0的LAYOUT指南(三)
- The solution to the inconsistency between the PaddleX deployment inference model and the GUI interface test results
- Pyspark Machine Learning: Vectors and Common Operations
- Swastika line-by-line parsing and realization of the Transformer, and German translation practice (2)
- typescript27-枚举类型呢
- Power button (LeetCode) 212. The word search II (2022.07.31)
- 【目标检测】YOLOv7理论简介+实践测试
- Robot_Framework:断言
猜你喜欢
typescript19-对象可选参数
MySQL-Data Definition Language-DDLdatebase define language
UE4 制作遇到的问题
The solution to the inconsistency between the PaddleX deployment inference model and the GUI interface test results
PAT serie b write the number 1002
初识shell脚本
(2022牛客多校四)H-Wall Builder II(思维)
华为Android开发面试后得出的面试秘诀
y83. Chapter 4 Prometheus Factory Monitoring System and Actual Combat -- Advanced Prometheus Alarm Mechanism (14)
Robot_Framework:断言
随机推荐
文件的异步读写
LeetCode 1189. “气球” 的最大数量
typescript20-接口
Error: AttributeError: module 'matplotlib' has no attribute 'figure'
(2022牛客多校四)N-Particle Arts(思维)
typescript27-枚举类型呢
可持久化线段树
中国的机器人增长
typescript26 - literal types
vim configuration + ctag is as easy to read code as source insight
typescript22-接口继承
Seleniu:元素常用操作
请求/响应拦截器写法
Selenium: form switching
UE4 从鼠标位置射出射线检测
Check控件
MySQL Practice Summary -
(2022牛客多校四)A-Task Computing (排序+动态规划)
Code Interview Guide for Programmers CD15 Generating an Array of Windowed Maximums
(Codeforce 757)E. Bash Plays with Functions(积性函数)