当前位置:网站首页>Interview: what are the positioning methods in selenium? Which one do you use most?
Interview: what are the positioning methods in selenium? Which one do you use most?
2022-06-27 04:58:00 【Field test record】
Hello, everyone , I'm Daejeon .
Selenium There are eight positioning methods in :id、name、class_name、tag_name、link_text、partitial_link_text、XPath、CSS.
There are three kinds of commonly used :
The first is id: There is id, Use id It is easy to locate , The positioning speed is the fastest ;
The second is XPath: Most of the time, the label attributes of the front end are not standardized , The element cannot be uniquely determined , Use XPath Relative position positioning ;
The third is CSS positioner , Locating in the browser is faster than XPath fast .
It should be noted that : When positioning elements , Try to choose stable 、 Element attributes that are not easy to change , stay XPath Use indexes as little as possible in , To some extent, it can reduce the maintenance of automated test scripts .
The above is what Daejeon shares today , If you find it useful , You can give Daejeon a compliment ~
边栏推荐
- 真xx相来了?测试/开发程序员为什么不愿意加班,这是个疯狂的状态......
- Mysql database foundation: DQL data query language
- Microservice system design -- service registration, discovery and configuration design
- 012 C language foundation: C array
- math_ Number set (number set symbol) and set theory
- 轨道姿态常用编程缩写
- 微服务系统设计——服务注册与发现和配置设计
- three.js第一人称 相机前枪的跟随
- neo4j community与neo4j desktop冲突
- leetcode-20. Valid parentheses -js version
猜你喜欢

机械转码日记【17】模板,STL简介

Kotlin compose custom compositionlocalprovider compositionlocal

微服务系统设计——分布式事务服务设计

Mysql database foundation: DQL data query language

微服务系统设计——服务熔断和降级设计

微服务系统设计——微服务调用设计

渗透测试-文件上传/下载/包含

1.5 conda的使用

Système de collecte des journaux

Microservice system design -- unified authentication service design
随机推荐
Golang Hello installation environment exception [resolved]
Common programming abbreviations for orbit attitude
016 C语言基础:C语言枚举类型
WPF open source control library extended WPF toolkit Introduction (Classic)
Système de collecte des journaux
什么是BFC?有什么用?
022 C语言基础:C内存管理与C命令行参数
Penetration test - file upload / download / include
Fastdds server records - Translation-
neo4j数据库导出
pycharm 如何安装 package
Microservice system design -- unified authentication service design
Microservice system design - service fusing and degradation design
微服务系统设计——分布式事务服务设计
2022-06-26:以下golang代码输出什么?A:true;B:false;C:编译错误。 package main import “fmt“ func main() { type
golang hello 安装环境异常【已解决】
022 basics of C language: C memory management and C command line parameters
013 basics of C language: C pointer
微服务系统设计——服务注册与发现和配置设计
How to make ef core 6 support dateonly type