We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
url_matches
None
1 parent 2ac53b8 commit 9a30730Copy full SHA for 9a30730
py/selenium/webdriver/support/expected_conditions.py
@@ -88,12 +88,13 @@ def _predicate(driver):
88
def url_matches(pattern: str):
89
"""An expectation for checking the current url.
90
91
- pattern is the expected pattern, which must be an exact match
92
- returns True if the url matches, false otherwise.
+ pattern is the expected pattern. This finds the first
+ occurrence of pattern in the current url and as such does
93
+ not require an exact full match.
94
"""
95
96
def _predicate(driver):
- return bool(re.search(pattern, driver.current_url))
97
+ return re.search(pattern, driver.current_url) is not None
98
99
return _predicate
100
0 commit comments