Загрузка страницы

How many types of XPATH there are?

There are two types of XPaths: one is Absolute XPath, and the other is Relative XPath. Absolute XPath starts with a single slash, meaning it starts from the root element, which is HTML, and goes step by step to the desired web element. This locator is not stable and will break easily if there is any minimal change in the HTML page, so it's not recommended to use it, and we are not using Absolute XPath.

Relative XPath is the one that we are using. It starts with a double slash, which means it jumps to the web element provided. Relative XPath is more reliable because we are being very specific, compared to Absolute XPath.

This question also can come with the difference between single slash and double slash as well. You can see that a single slash means it's just going one by one; it goes directly to the elements under that. But a double slash can jump to anywhere you want to go.

From this perspective, please hit the like button if you find this video helpful, and consider subscribing to our channel if you would like to stay connected. Also, please let me know in the comment section which UI test automation interview question you want me to cover next. Thank you so much.
#xpath #selenium #cydeo

Website: https://cydeo.com/
Instagram: https://www.instagram.com/cydeo/
Linkedin: https://www.linkedin.com/school/cydeo-official/
Twitter: https://twitter.com/Cydeo_Official
Facebook: https://www.facebook.com/CYDEO.Official/

Видео How many types of XPATH there are? канала CYDEO
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
21 декабря 2023 г. 19:00:51
00:01:46
Яндекс.Метрика