2222
2323
2424class ElementABC (MixinABC , ABC ):
25-
2625 name : str
2726 parent : Any | bool | None
2827 wait : bool | None
@@ -170,11 +169,11 @@ def uncheck(self) -> Element:
170169 raise NotImplementedError
171170
172171 def wait_visibility (
173- self ,
174- * ,
175- timeout : int = WAIT_EL ,
176- silent : bool = False ,
177- continuous : bool | float = False ,
172+ self ,
173+ * ,
174+ timeout : int = WAIT_EL ,
175+ silent : bool = False ,
176+ continuous : bool | float = False ,
178177 ) -> Element :
179178 """
180179 Wait until the element becomes visible.
@@ -206,11 +205,11 @@ def wait_visibility(
206205 raise NotImplementedError
207206
208207 def wait_hidden (
209- self ,
210- * ,
211- timeout : int = WAIT_EL ,
212- silent : bool = False ,
213- continuous : bool | float = False ,
208+ self ,
209+ * ,
210+ timeout : int = WAIT_EL ,
211+ silent : bool = False ,
212+ continuous : bool | float = False ,
214213 ) -> Element :
215214 """
216215 Wait until the element becomes hidden.
@@ -266,10 +265,10 @@ def wait_availability(self, *, timeout: int = WAIT_EL, silent: bool = False) ->
266265 raise NotImplementedError
267266
268267 def save_screenshot (
269- self ,
270- file_name : str ,
271- screenshot_base : bytes | Image = None ,
272- convert_type : str | None = None ,
268+ self ,
269+ file_name : str ,
270+ screenshot_base : bytes | Image = None ,
271+ convert_type : str | None = None ,
273272 ) -> Image :
274273 """
275274 Save a screenshot of the element.
@@ -534,11 +533,11 @@ def send_keyboard_action(self, action: str | KeyboardKeys) -> Element:
534533 raise NotImplementedError
535534
536535 def wait_elements_count (
537- self ,
538- expected_count : int ,
539- * ,
540- timeout : float = WAIT_EL ,
541- silent : bool = False ,
536+ self ,
537+ expected_count : int ,
538+ * ,
539+ timeout : float = WAIT_EL ,
540+ silent : bool = False ,
542541 ) -> Element :
543542 """
544543 Wait until the number of matching elements equals the expected count.
@@ -567,11 +566,11 @@ def wait_elements_count(
567566 raise NotImplementedError
568567
569568 def wait_for_text (
570- self ,
571- expected_text : str | None = None ,
572- * ,
573- timeout : float = WAIT_EL ,
574- silent : bool = False ,
569+ self ,
570+ expected_text : str | None = None ,
571+ * ,
572+ timeout : float = WAIT_EL ,
573+ silent : bool = False ,
575574 ) -> Element :
576575 """
577576 Wait for the presence of a specific text in the current element, or for any non-empty text.
@@ -600,11 +599,11 @@ def wait_for_text(
600599 raise NotImplementedError
601600
602601 def wait_for_value (
603- self ,
604- expected_value : str | None = None ,
605- * ,
606- timeout : float = WAIT_EL ,
607- silent : bool = False ,
602+ self ,
603+ expected_value : str | None = None ,
604+ * ,
605+ timeout : float = WAIT_EL ,
606+ silent : bool = False ,
608607 ) -> Element :
609608 """
610609 Wait for a specific value in the current element, or for any non-empty value.
@@ -633,11 +632,11 @@ def wait_for_value(
633632 raise NotImplementedError
634633
635634 def wait_visibility_without_error (
636- self ,
637- * ,
638- timeout : float = QUARTER_WAIT_EL ,
639- silent : bool = False ,
640- continuous : bool | float = False ,
635+ self ,
636+ * ,
637+ timeout : float = QUARTER_WAIT_EL ,
638+ silent : bool = False ,
639+ continuous : bool | float = False ,
641640 ) -> Element :
642641 """
643642 Wait for the element to become visible, without raising an error if it does not.
@@ -669,11 +668,11 @@ def wait_visibility_without_error(
669668 raise NotImplementedError
670669
671670 def wait_hidden_without_error (
672- self ,
673- * ,
674- timeout : float = QUARTER_WAIT_EL ,
675- silent : bool = False ,
676- continuous : bool | float = False ,
671+ self ,
672+ * ,
673+ timeout : float = QUARTER_WAIT_EL ,
674+ silent : bool = False ,
675+ continuous : bool | float = False ,
677676 ) -> Element :
678677 """
679678 Wait for the element to become hidden, without raising an error if it does not.
@@ -755,11 +754,11 @@ def wait_disabled(self, *, timeout: float = WAIT_EL, silent: bool = False) -> El
755754 raise NotImplementedError
756755
757756 def wait_for_size (
758- self ,
759- expected_size : Size ,
760- * ,
761- timeout : float = WAIT_EL ,
762- silent : bool = False ,
757+ self ,
758+ expected_size : Size ,
759+ * ,
760+ timeout : float = WAIT_EL ,
761+ silent : bool = False ,
763762 ) -> Element :
764763 """
765764 Wait until element size will be equal to given :class:`.Size` object
@@ -814,11 +813,11 @@ def is_fully_visible(self, check_displaying: bool = True, silent: bool = False)
814813 raise NotImplementedError
815814
816815 def scroll_into_view (
817- self ,
818- block : ScrollTo = ScrollTo .CENTER ,
819- behavior : ScrollTypes = ScrollTypes .INSTANT ,
820- sleep : float = 0 ,
821- silent : bool = False ,
816+ self ,
817+ block : ScrollTo = ScrollTo .CENTER ,
818+ behavior : ScrollTypes = ScrollTypes .INSTANT ,
819+ sleep : float = 0 ,
820+ silent : bool = False ,
822821 ) -> Element :
823822 """
824823 Scrolls the element into view using a JavaScript script.
@@ -836,17 +835,17 @@ def scroll_into_view(
836835 raise NotImplementedError
837836
838837 def assert_screenshot (
839- self ,
840- filename : str = '' ,
841- test_name : str = '' ,
842- name_suffix : str = '' ,
843- threshold : float | None = None ,
844- delay : float | None = None ,
845- scroll : bool = False ,
846- remove : Element | list [Element ] = None ,
847- fill_background : str | bool = False ,
848- cut_box : Box = None ,
849- hide : Element | list [Element ] = None ,
838+ self ,
839+ filename : str = '' ,
840+ test_name : str = '' ,
841+ name_suffix : str = '' ,
842+ threshold : float | None = None ,
843+ delay : float | None = None ,
844+ scroll : bool = False ,
845+ remove : Element | list [Element ] = None ,
846+ fill_background : str | bool = False ,
847+ cut_box : Box = None ,
848+ hide : Element | list [Element ] = None ,
850849 ) -> None :
851850 """
852851 Assert that the given screenshot matches the currently taken screenshot.
@@ -885,17 +884,17 @@ def assert_screenshot(
885884 raise NotImplementedError
886885
887886 def soft_assert_screenshot (
888- self ,
889- filename : str = '' ,
890- test_name : str = '' ,
891- name_suffix : str = '' ,
892- threshold : float | None = None ,
893- delay : float | None = None ,
894- scroll : bool = False ,
895- remove : Element | list [Element ] = None ,
896- fill_background : str | bool = False ,
897- cut_box : Box = None ,
898- hide : Element | list [Element ] = None ,
887+ self ,
888+ filename : str = '' ,
889+ test_name : str = '' ,
890+ name_suffix : str = '' ,
891+ threshold : float | None = None ,
892+ delay : float | None = None ,
893+ scroll : bool = False ,
894+ remove : Element | list [Element ] = None ,
895+ fill_background : str | bool = False ,
896+ cut_box : Box = None ,
897+ hide : Element | list [Element ] = None ,
899898 ) -> tuple [bool , str ]:
900899 """
901900 Compare the currently taken screenshot to the expected screenshot and return a result.
0 commit comments