Rough and Precise Location | Bondar Academy
Course: AI-based testing with testRigor
Module: Locating Web Elements
Instructor: Artem Bondar
Lesson Summary
This lesson focuses on using rough location techniques to find web elements on a webpage, particularly when traditional locators fail due to size or overlap issues. Key Concepts Rough Location : Allows for less precise element selection by indicating a general area (e.g., "roughly above radius"). Overlap Rule : The 30% overlap rule can hinder element selection if the bounding box is too large. Combining Locators : Using multiple locators can enhance precision when selecting elements. Examples Demonstrated Using the grid above radius failed due to size constraints. Adjusting the overlap to 15% allowed the test to pass. Selecting the password field to the right of another element successfully using a rough location approach. Combining locators, such as selecting an email input field to the right of radius and above the password label, demonstrated how to achieve precise targeting. Important Techniques Use roughly to indicate a general area for element selection. Combine locators with and for more precise targeting, where the first locator defaults to roughly. Utilize completely for exact positioning when necessary, particularly in complex UI scenarios. In summary, mastering these techniques can significantly improve your ability to locate elements effectively in automated testing environments. See you in the next lesson!