Skip to content

Commit 29ba2cf

Browse files
committed
Ignore leading & trailing whitespace for assert_title(title)
1 parent e68a777 commit 29ba2cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2921,8 +2921,8 @@ def assert_raises(self, *args, **kwargs):
29212921
def assert_title(self, title):
29222922
""" Asserts that the web page title matches the expected title. """
29232923
self.wait_for_ready_state_complete()
2924-
expected = title
2925-
actual = self.get_page_title()
2924+
expected = title.strip()
2925+
actual = self.get_page_title().strip()
29262926
try:
29272927
self.assertEqual(expected, actual, "Expected page title [%s] "
29282928
"does not match the actual page title [%s]!"

0 commit comments

Comments
 (0)