Skip to content

Commit 221b2a0

Browse files
committed
Change type hints order, because it is meaningfull in the RF 4.0
1 parent 9e27924 commit 221b2a0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/SeleniumLibrary/keywords/browsermanagement.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def open_browser(
6161
url: Optional[str] = None,
6262
browser: str = "firefox",
6363
alias: Optional[str] = None,
64-
remote_url: Union[str, bool] = False,
65-
desired_capabilities: Union[str, dict, None] = None,
64+
remote_url: Union[bool, str] = False,
65+
desired_capabilities: Union[dict, None, str] = None,
6666
ff_profile_dir: Optional[str] = None,
6767
options: Any = None,
6868
service_log_path: Optional[str] = None,

src/SeleniumLibrary/keywords/element.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ def get_vertical_position(self, locator: str) -> int:
531531
return self.find_element(locator).location["y"]
532532

533533
@keyword
534-
def click_button(self, locator: str, modifier: Union[str, bool] = False):
534+
def click_button(self, locator: str, modifier: Union[bool, str] = False):
535535
"""Clicks the button identified by ``locator``.
536536
537537
See the `Locating elements` section for details about the locator
@@ -553,7 +553,7 @@ def click_button(self, locator: str, modifier: Union[str, bool] = False):
553553
self._click_with_modifier(locator, ["button", "input"], modifier)
554554

555555
@keyword
556-
def click_image(self, locator: str, modifier: Union[str, bool] = False):
556+
def click_image(self, locator: str, modifier: Union[bool, str] = False):
557557
"""Clicks an image identified by ``locator``.
558558
559559
See the `Locating elements` section for details about the locator
@@ -576,7 +576,7 @@ def click_image(self, locator: str, modifier: Union[str, bool] = False):
576576
self._click_with_modifier(locator, ["image", "input"], modifier)
577577

578578
@keyword
579-
def click_link(self, locator: str, modifier: Union[str, bool] = False):
579+
def click_link(self, locator: str, modifier: Union[bool, str] = False):
580580
"""Clicks a link identified by ``locator``.
581581
582582
See the `Locating elements` section for details about the locator
@@ -598,7 +598,7 @@ def click_link(self, locator: str, modifier: Union[str, bool] = False):
598598
def click_element(
599599
self,
600600
locator: str,
601-
modifier: Union[str, bool] = False,
601+
modifier: Union[bool, str] = False,
602602
action_chain: bool = False,
603603
):
604604
"""Click the element identified by ``locator``.

0 commit comments

Comments
 (0)