当前位置:网站首页>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()
边栏推荐
- PAT乙级 1002 写出这个数
- Typescript22 - interface inheritance
- typescript27 - what about enumeration types
- Power button (LeetCode) 212. The word search II (2022.07.31)
- Excel record of integer programming optimization model to solve the problem
- 风险策略调优中重要的三步分析法
- LeetCode 387. 字符串中的第一个唯一字符
- 2022/07/29 入职健海JustFE团队,我学到了高效开发(年中总结)
- 李迟2022年7月工作生活总结
- y83. Chapter 4 Prometheus Factory Monitoring System and Actual Combat -- Advanced Prometheus Alarm Mechanism (14)
猜你喜欢
随机推荐
程序员代码面试指南 CD15 生成窗口最大值数组
typescript26-字面量类型
关于给Qt做一个软件初始化的进度条
高数 | 【重积分】线面积分880例题
typescript21-接口和类型别名的对比
Selenium:元素定位
JWL-11/2-99.9A电流继电器
万字逐行解析与实现Transformer,并进行德译英实战(二)
牛客多校2022第四场A,H,K,N
Error: AttributeError: module 'matplotlib' has no attribute 'figure'
Risk strategy important steps of tuning method
I met a shell script
Selenium: mouse, keyboard events
华为Android开发面试后得出的面试秘诀
(Codeforce 757)E. Bash Plays with Functions(积性函数)
MySQL-DML language-database operation language-insert-update-delete-truncate
25. 这三道常见的面试题,你有被问过吗?
(2022 Niu Ke Duo School IV) K-NIO's Sword (Thinking)
Robot_Framework: Assertion
typescript24-类型推论





![[MySQL] 多表查询](/img/f0/c158750a5a84155ee82729daba2bb3.png)



