-
Notifications
You must be signed in to change notification settings - Fork 14
Relative Locators
Selenium 4 introduces Relative Locators. These locators are helpful when it is not easy to construct a locator for the desired element, but easy to describe spatially where the element is in relation to an element that does have an easily constructed locator. You can get more details about them here. To simplify the work with relative locators, aquality.selenium.locators package has been added to the aquality-selenium framework. The main functionality is implemented in the RelativeBy wrapper of this package. The following examples demonstrate the functionality of this class.
Tests can be found in the test.integration.LocatorTests class. All tests work with this page. A fragment of the page is presented below (searched elements are in red frames).