You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Took me quite some time to figure out that I need to use relative path in the xpath expression to chain a By.xpath in the locator.
xpathExpression = ".//b" // this one works
xpathExpression = "//b" // it will find all elements from the root of DOM
Feature and motivation
Took me quite some time to figure out that I need to use relative path in the xpath expression to chain a By.xpath in the locator.
xpathExpression = ".//b" // this one works
xpathExpression = "//b" // it will find all elements from the root of DOM
It may worth mentioning in the doc
https://www.selenium.dev/documentation/webdriver/elements/finders/#evaluating-a-subset-of-the-dom
or
https://www.selenium.dev/documentation/webdriver/elements/finders/#find-elements-from-element
The text was updated successfully, but these errors were encountered: