Locatey by Xpath axes approach Selenium Webdriver with Java Tutorials
Title: XPath axes approach in selenium -Selenium Webdriver with Java Tutorials
Blog: www.amarindaz.com
FB page: https://www.facebook.com/amarindaz
Youtube subscription: https://goo.gl/J2453w
=========================
Subscribe and Stay Update!
Join our Automation testing newsletter and get updates delivered to your email- https://goo.gl/8ysm1X
==========================
What is XPath?
XPath is used to find the location of any Webelement on a webpage using HTML DOM structure
======================
What is Absolute xpath?
Absolute XPath starts with the root node or a forward slash (/).
The advantage of using absolute is, it identifies the element very fast.
Disadvantage: if some other tag or element added in between, then this path will no longer work.
Example:
html/head/body/table/tbody/tr/th
======================
What is Relative Xpath?
A relative xpath is one where the path starts from the middle of the HTML DOM structure.
It doesn't need to start from the root node.
It starts with Double forward slash(//)
It can search the element anywhere on the webpage.
Example:
//*[@class=‘google']
=======================
Difference between Single slash and Double slash
A single slash ‘/’ locate element immediately inside its parent element.
A double slash ‘//’ locate any child or any grand-child element inside the parent element.
======================
A different approach to find Relative Xpath:
Basic XPath
Contains()
OR & AND
Starts-with
Text()
By Index
XPath axes methods
XPath Axes Methods::
It used to find the complex or dynamic elements
1)Ancestor
2)Ancestor or self
3)Attribute
4)Child
5)Descendant
6)Descendant or self
7)following
8)following sibling
9)Namespace
10)Parent
11)Preceding
12)Preceding sibling
13)Self
Ancestor lets you select any Parent and Grandparent of the current node.
Ancestor-or-self lets you select any Parent and Grandparent of the current node including the current node
The child returns all the children in the current node.
Descendant lets you select Children and Grandchildren of the current node.
Descendant or self-lets you select Children and Grandchildren of the current node including current node
Following returns all in the document after the closing tag of the current node.
Following-sibling returns all the sibling after the closing tag of the current node.
Parent returns the parent of the current node.
Preceding returns all in the document before the current node
Preceding-sibling returns all the sibling before the current node
Self-returns the current node
For more details, please watch the video
Don't forget to subscribe! https://goo.gl/J2453w
? To Hire Me ? https://fwd.cx/WLGgpTiZW5HK
? Kite is a free AI-powered coding assistant that will help you code faster & smarter. It integrates seamlessly with all top editors and IDE. Kite gives you smart completions and documentation while you’re typing. I've been using Kite on VSCode for 6 months and I love it! Check out Kite ? http://bit.ly/get-kite
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Locatey by Xpath axes approach Selenium Webdriver with Java Tutorials», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.