当前位置:网站首页>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 ~
边栏推荐
- 007 basics of C language: C operator
- 流媒体协议初探(MPEG2-TS、RTSP、RTP、RTCP、SDP、RTMP、HLS、HDS、HSS、MPEG-DASH)
- 高等数学(第七版)同济大学 习题1-10 个人解答
- 008 C language foundation: C judgment
- Fastdds server records - Translation-
- The most detailed download tutorial of MySQL
- 微服务系统设计——API 网关服务设计
- 清华大学开源软件镜像站网址
- 006 C language foundation: C storage class
- 百度飞桨“万有引力”2022首站落地苏州,全面启动中小企业赋能计划
猜你喜欢

Installation of low code development platform nocobase
![[BJDCTF2020]The mystery of ip](/img/f8/c3a7334252724635d42c8db3d1bbb0.png)
[BJDCTF2020]The mystery of ip

Redis high availability cluster (sentry, cluster)
![[unity] button of UI interactive component & summary of optional base classes](/img/9f/be9005f03ad9a2bc8da0f910f064c5.png)
[unity] button of UI interactive component & summary of optional base classes

【622. 设计循环队列】

leetcode-20. Valid parentheses -js version

Building lightweight target detection based on mobilenet-yolov4

Argo workflows - getting started with kubernetes' workflow engine
![[station B up dr_can learning notes] Kalman filter 3](/img/40/d3ec97be2f29b76a6c049c26ff4998.gif)
[station B up dr_can learning notes] Kalman filter 3

Microservice system design -- service registration, discovery and configuration design
随机推荐
《数据库原理与应用》第一版 马春梅……编著 期末复习笔记
017 basics of C language: bit field and typedef
math_数集(数集符号)和集合论
EPICS记录参考5 -- 数组模拟输入记录Array Analog Input (aai)
面对AI人才培养的“产学研”鸿沟,昇腾AI如何做厚产业人才黑土地?
006 C语言基础:C存储类
日志收集系统
Building lightweight target detection based on mobilenet-yolov4
Cache comprehensive project - seckill architecture
深潜Kotlin协程(十五):测试 Kotlin 协程
Penetration test - file upload / download / include
MySql最详细的下载教程
微服务系统设计——分布式事务服务设计
第2章 关键技术介绍
Almost because of json Stringify lost his bonus
020 basics of C language: C language forced type conversion and error handling
【B站UP DR_CAN学习笔记】Kalman滤波3
014 C language foundation: C string
The most detailed download tutorial of MySQL
牛客练习赛101-C 推理小丑---位运算+思维