- Selenium WebDriver Quick Start Guide
- Pinakin Chaubal
- 108字
- 2021-06-24 18:26:29
The two types of XPaths
Let's now understand what absolute XPaths are and how they differ from relative (customized) XPaths:
- An absolute XPath is the entire path of the WebElement taken from the root node. For example, html/body/div/a.
- A relative or customized XPath is one in which we use the following format. For example, if the div has an id of ABC, then the same absolute XPath will be //div[@id='ABC']/a.
There is an apparent problem with the absolute type of XPath. If the DOM structure changes in the future (for example, if div is removed), then this path will undergo changes.
推薦閱讀
- Linux設備驅動開發詳解:基于最新的Linux4.0內核
- Linux網絡管理與配置(第2版)
- 嵌入式Linux應用開發菜鳥進階
- Linux自動化運維:Shell與Ansible(微課版)
- Mobile First Design with HTML5 and CSS3
- Linux內核設計的藝術:圖解Linux操作系統架構設計與實現原理
- NetDevOps入門與實踐
- RHCSARHCE 紅帽Linux認證學習指南(第7版)EX200 & EX300
- INSTANT Galleria Howto
- Windows 7實戰從入門到精通
- 鴻蒙操作系統設計原理與架構
- 大規模分布式系統架構與設計實戰
- Zabbix監控系統之深度解析和實踐
- Linux從入門到精通(視頻教學版)
- OpenHarmony開發與實踐:基于紅莓RK2206開發板