Skip to content

Commit f2093f2

Browse files
committed
Fix similar error on other keywords too
1 parent fc54321 commit f2093f2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

atest/acceptance/keywords/elements.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Get Element Attribute Value Should Be Should Be Succesfull error and error messa
8383
... Element with locator 'id=non_existing' not found.
8484
... Element Attribute Value Should Be id=non_existing href http://non_existing.com
8585
Run Keyword And Expect Error
86-
... Element 'link=Target opens in new window' attribute should have value 'http://localhost:7000/html/indéx.html' but its value was 'http://localhost:7000/html/index.html'.
86+
... http://localhost:7000/html/index.html'.' but got 'Element 'link=Target opens in new window' attribute should have value 'http://localhost:7000/html/indéx.html (str)' but its value was 'http://localhost:7000/html/index.html' (str).
8787
... Element Attribute Value Should Be link=Target opens in new window href http://localhost:7000/html/indéx.html
8888

8989
Get Horizontal Position

src/SeleniumLibrary/keywords/element.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def get_webelements(self, locator: Union[WebElement, str]) -> List[WebElement]:
5555
def element_should_contain(
5656
self,
5757
locator: Union[WebElement, str],
58-
expected: str,
58+
expected: Union[None, str],
5959
message: Optional[str] = None,
6060
ignore_case: bool = False,
6161
):
@@ -93,7 +93,7 @@ def element_should_contain(
9393
def element_should_not_contain(
9494
self,
9595
locator: Union[WebElement, str],
96-
expected: str,
96+
expected: Union[None, str],
9797
message: Optional[str] = None,
9898
ignore_case: bool = False,
9999
):
@@ -326,7 +326,7 @@ def element_should_not_be_visible(
326326
def element_text_should_be(
327327
self,
328328
locator: Union[WebElement, str],
329-
expected: str,
329+
expected: Union[None, str],
330330
message: Optional[str] = None,
331331
ignore_case: bool = False,
332332
):
@@ -362,7 +362,7 @@ def element_text_should_be(
362362
def element_text_should_not_be(
363363
self,
364364
locator: Union[WebElement, str],
365-
not_expected: str,
365+
not_expected: Union[None, str],
366366
message: Optional[str] = None,
367367
ignore_case: bool = False,
368368
):

0 commit comments

Comments
 (0)