Skip to content

Commit 73b7693

Browse files
committed
Str and number should work in same manner
1 parent 857e70e commit 73b7693

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

atest/acceptance/keywords/content_assertions.robot

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ Page Should Contain
2727
Page Should Contain This is the haystack
2828
Page Should Contain non existing text
2929

30+
Page Should Contain Numbers And String Should Be Same
31+
Log Source
32+
Page Should Contain 1
33+
Page Should Contain ${1}
34+
3035
Page Should Contain With Text Having Internal Elements
3136
Page Should Contain This is the haystack and somewhere on this page is a needle.
3237
Go to page "links.html"

atest/resources/html/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
<!-- this is a comment -->
88
<p>This is more text</p>
99
<span id="some_id">This text is inside an identified element</span>
10+
<span>1</span>
1011
</body>
1112
</html>

src/SeleniumLibrary/utils/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
from .types import is_falsy, is_noney, is_string, is_truthy, WINDOWS # noqa
2121

2222

23-
def escape_xpath_value(value):
23+
def escape_xpath_value(value: str):
24+
value = str(value)
2425
if '"' in value and "'" in value:
2526
parts_wo_apos = value.split("'")
2627
escaped = "', \"'\", '".join(parts_wo_apos)

0 commit comments

Comments
 (0)