Relative Location | Bondar Academy
Course: AI-based testing with testRigor
Module: Locating Web Elements
Instructor: Artem Bondar
Lesson Summary
In this lesson, we explore how to find web elements on a webpage using Test Trigger . We will practice the concepts discussed in the previous lesson through hands-on activities. Finding Web Elements To locate web elements, follow these steps: Right-click on the desired element and select Inspect to open Chrome DevTools . In the Elements tab, observe the DOM structure of the webpage. Hover over elements to see their highlighted boxes and details, such as padding and size. Performing Click Operations To interact with elements, we can use unique identifiers. For example, to click on the radius button , we can create a custom test case: click forms click form layouts Since "forms" and "form layouts" are unique, Test Trigger can identify and interact with them directly. Using Relative Locators When clicking on elements like labels or input fields, ensure the identifiers are specific: click password above radius click email above radius To specify an input field, use: click input password to the right top of radius Advanced Element Selection In cases with multiple similar elements, such as submit buttons, use additional context: click submit to the right of remember me For elements without visible identifiers, utilize attributes like ID or CSS selectors : click status danger Conclusion This lesson demonstrated how to locate web elements relatively and effectively using Test Trigger . By leveraging unique identifiers and understanding the DOM , you can enhance your testing accuracy.