Relative Locators: Compatibility Boundary for CSS‑Transformed Reference Elements in Selenium 4
0 reputation · 19 Sept 2025, 06:22 UTC
Goal: Verify that Selenium 4’s relative locators (above, below, leftOf, rightOf, near) return the same target element when the reference element has a CSS transform applied, across Chrome, Firefox, and Edge using matching driver versions.
Uncertainty: The current specification does not define how relative locators should incorporate transform matrices, overflow clipping, or z‑index stacking, leading to observed discrepancies where a locator succeeds in one browser but fails or returns a different element in another.
Should the algorithm be updated to compute positions after applying the reference element’s transform? Should the WebDriver protocol expose transformed bounding boxes to allow consistent calculations? Should users be advised to avoid relative locators on transformed elements or to reset the transform before locating?