@@ -8898,12 +8898,11 @@ def wait_for_element(self, selector, by="css selector", timeout=None):
8898
8898
def get_element(self, selector, by="css selector", timeout=None):
8899
8899
"""Same as wait_for_element_present() - returns the element.
8900
8900
The element does not need be visible (it may be hidden)."""
8901
- self.__check_scope()
8902
- if not timeout:
8903
- timeout = settings.LARGE_TIMEOUT
8904
- if self.timeout_multiplier and timeout == settings.LARGE_TIMEOUT:
8905
- timeout = self.__get_new_timeout(timeout)
8906
- selector, by = self.__recalculate_selector(selector, by)
8901
+ return self.wait_for_element_present(selector, by=by, timeout=timeout)
8902
+
8903
+ def locator(self, selector, by="css selector", timeout=None):
8904
+ """Same as wait_for_element_present() - returns the element.
8905
+ The element does not need be visible (it may be hidden)."""
8907
8906
return self.wait_for_element_present(selector, by=by, timeout=timeout)
8908
8907
8909
8908
def wait_for_query_selector(
@@ -9000,11 +8999,6 @@ def assert_elements_present(self, *args, **kwargs):
9000
8999
9001
9000
def find_element(self, selector, by="css selector", timeout=None):
9002
9001
"""Same as wait_for_element_visible() - returns the element"""
9003
- self.__check_scope()
9004
- if not timeout:
9005
- timeout = settings.LARGE_TIMEOUT
9006
- if self.timeout_multiplier and timeout == settings.LARGE_TIMEOUT:
9007
- timeout = self.__get_new_timeout(timeout)
9008
9002
return self.wait_for_element_visible(selector, by=by, timeout=timeout)
9009
9003
9010
9004
def assert_element(self, selector, by="css selector", timeout=None):
0 commit comments