当前位置:网站首页>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()
边栏推荐
- LeetCode 387. 字符串中的第一个唯一字符
- pytroch、tensorflow对比学习—使用GPU训练模型
- MySQL-数据操作-分组查询-连接查询-子查询-分页查询-联合查询
- 4D line-by-line analysis and implementation of Transformer, and German translation into English (3)
- Immutable
- 请问表格储存中用sql只能查询到主键列,ots sql非主键不支持吗?
- 剑指 Offer 68 - II. 二叉树的最近公共祖先
- Challenge 52 days to memorize Peppa Pig (Day 01)
- 风险策略调优中重要的三步分析法
- The method of solving stored procedure table name passing through variable in mysql
猜你喜欢

中国的机器人增长

Typescript20 - interface

UE4 模型OnClick事件不生效的两种原因

What should I do if the neural network cannot be trained?

SL-12/2过流继电器

pytroch、tensorflow对比学习—专栏介绍

pytroch、tensorflow对比学习—功能组件(数据管道、回调函数、特征列处理)

牛客多校2022第四场A,H,K,N

Power button (LeetCode) 212. The word search II (2022.07.31)

2022年超全的Android面经(附含面试题|进阶资料)
随机推荐
文件的异步读写
API Design Notes: The pimpl trick
Selenium: Popup Handling
mysql中解决存储过程表名通过变量传递的方法
请求/响应拦截器写法
LeetCode 231. 2 的幂
(2022牛客多校四)N-Particle Arts(思维)
罗技鼠标体验记录
I met a shell script
类神经网络训练不起来怎么办
Selenium: mouse, keyboard events
II. Binary tree to Offer 68 - recent common ancestor
vim configuration + ctag is as easy to read code as source insight
李迟2022年7月工作生活总结
混合型界面:对话式UI的未来
Swastika line-by-line parsing and realization of the Transformer, and German translation practice (a)
JWL-11/2-99.9A电流继电器
USB3.0:VL817Q7-C0的LAYOUT指南(二)
(Codeforce 757) E. Bash Plays with Functions
备战金九银十,如何顺利通过互联网大厂Android的笔面试?