Skip to content

Commit

Permalink
Merge pull request #1898 from emanlove/fix-locator-type-hints-1880
Browse files Browse the repository at this point in the history
Removed None type for locator where is shouldn't be
  • Loading branch information
emanlove authored Apr 30, 2024
2 parents 0785ede + c083b0f commit d76883a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/SeleniumLibrary/keywords/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _capture_page_screen_to_log(self):
@keyword
def capture_element_screenshot(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
filename: str = DEFAULT_FILENAME_ELEMENT,
) -> str:
"""Captures a screenshot from the element identified by ``locator`` and embeds it into log file.
Expand Down
14 changes: 7 additions & 7 deletions src/SeleniumLibrary/keywords/tableelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TableElementKeywords(LibraryComponent):
@keyword
def get_table_cell(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
row: int,
column: int,
loglevel: str = "TRACE",
Expand Down Expand Up @@ -89,7 +89,7 @@ def _get_rows(self, locator, count):
@keyword
def table_cell_should_contain(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
row: int,
column: int,
expected: str,
Expand All @@ -112,7 +112,7 @@ def table_cell_should_contain(
@keyword
def table_column_should_contain(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
column: int,
expected: str,
loglevel: str = "TRACE",
Expand Down Expand Up @@ -143,7 +143,7 @@ def table_column_should_contain(
@keyword
def table_footer_should_contain(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
expected: str,
loglevel: str = "TRACE",
):
Expand All @@ -168,7 +168,7 @@ def table_footer_should_contain(
@keyword
def table_header_should_contain(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
expected: str,
loglevel: str = "TRACE",
):
Expand All @@ -193,7 +193,7 @@ def table_header_should_contain(
@keyword
def table_row_should_contain(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
row: int,
expected: str,
loglevel: str = "TRACE",
Expand Down Expand Up @@ -224,7 +224,7 @@ def table_row_should_contain(
@keyword
def table_should_contain(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
expected: str,
loglevel: str = "TRACE",
):
Expand Down
14 changes: 7 additions & 7 deletions src/SeleniumLibrary/keywords/waiting.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def wait_until_page_does_not_contain(
@keyword
def wait_until_page_contains_element(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
timeout: Optional[timedelta] = None,
error: Optional[str] = None,
limit: Optional[int] = None,
Expand Down Expand Up @@ -260,7 +260,7 @@ def wait_until_page_contains_element(
@keyword
def wait_until_page_does_not_contain_element(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
timeout: Optional[timedelta] = None,
error: Optional[str] = None,
limit: Optional[int] = None,
Expand Down Expand Up @@ -298,7 +298,7 @@ def wait_until_page_does_not_contain_element(
@keyword
def wait_until_element_is_visible(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
timeout: Optional[timedelta] = None,
error: Optional[str] = None,
):
Expand All @@ -321,7 +321,7 @@ def wait_until_element_is_visible(
@keyword
def wait_until_element_is_not_visible(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
timeout: Optional[timedelta] = None,
error: Optional[str] = None,
):
Expand All @@ -344,7 +344,7 @@ def wait_until_element_is_not_visible(
@keyword
def wait_until_element_is_enabled(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
timeout: Optional[timedelta] = None,
error: Optional[str] = None,
):
Expand Down Expand Up @@ -372,7 +372,7 @@ def wait_until_element_is_enabled(
@keyword
def wait_until_element_contains(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
text: str,
timeout: Optional[timedelta] = None,
error: Optional[str] = None,
Expand All @@ -396,7 +396,7 @@ def wait_until_element_contains(
@keyword
def wait_until_element_does_not_contain(
self,
locator: Union[WebElement, None, str],
locator: Union[WebElement, str],
text: str,
timeout: Optional[timedelta] = None,
error: Optional[str] = None,
Expand Down

0 comments on commit d76883a

Please sign in to comment.