MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / get_element_at_x_y

Method get_element_at_x_y

seleniumbase/fixtures/base_case.py:3533–3539  ·  view source on GitHub ↗

Return element at current window's x,y coordinates.

(self, x, y)

Source from the content-addressed store, hash-verified

3531 return self.driver.execute_script(script, *args, **kwargs)
3532
3533 def get_element_at_x_y(self, x, y):
3534 """Return element at current window's x,y coordinates."""
3535 self.__check_scope()
3536 self._check_browser()
3537 return self.execute_script(
3538 "return document.elementFromPoint(%s, %s);" % (x, y)
3539 )
3540
3541 def get_gui_element_rect(self, selector, by="css selector"):
3542 """Very similar to element.rect, but the x, y coordinates are

Callers

nothing calls this directly

Calls 3

__check_scopeMethod · 0.95
_check_browserMethod · 0.95
execute_scriptMethod · 0.95

Tested by

no test coverage detected