You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docstring of url_matches the pattern should be matched against the url exactly - Is a re.search sufficient here over re.fullmatch ?
"""An expectation for checking the current url. pattern is the expected pattern, which must be an exact match returns True if the url matches, false otherwise. """
This may be as expected, either way we should either update the docstring if the current searching is adequate, or move to re.fullmatch maybe if the implementation is slightly off?
theres also a url_to_be that relies on string equality, which is slightly less usable for polling against dynamic aspects of a url, so the docstring might just of been a copy-paste mistake there.
Will take a look at other bindings if they implement EC in this particular use case (if at all - not sure if ec was removed from some or if that was mostly talk at the time)
How can we reproduce the issue?
from selenium import webdriver
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
with webdriver.Chrome() as driver:
driver.get("https://www.selenium.dev")
# matches on first iteration
_ = WebDriverWait(driver, timeout=30).until(expected_conditions.url_matches(pattern="dev"))
Relevant log output
Not Applicable.
Operating System
N/A
Selenium version
4.7.2
What are the browser(s) and version(s) where you see this issue?
Not Applicable.
What are the browser driver(s) and version(s) where you see this issue?
Not Applicable.
Are you using Selenium Grid?
Not Applicable.
The text was updated successfully, but these errors were encountered:
@symonk, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template label.
If the issue is a question, add the I-question label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-* label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer label.
quick look at the java code that relies on pattern.matcher(url).find(); which I think finds the first occurrence anywhere in the string? (similar to pythons re.search(...)
What happened?
According to the docstring of
url_matches
the pattern should be matched against the url exactly - Is are.search
sufficient here overre.fullmatch
?This may be as expected, either way we should either update the docstring if the current searching is adequate, or move to
re.fullmatch
maybe if the implementation is slightly off?theres also a
url_to_be
that relies on string equality, which is slightly less usable for polling against dynamic aspects of a url, so the docstring might just of been a copy-paste mistake there.Will take a look at other bindings if they implement EC in this particular use case (if at all - not sure if ec was removed from some or if that was mostly talk at the time)
How can we reproduce the issue?
Relevant log output
Operating System
N/A
Selenium version
4.7.2
What are the browser(s) and version(s) where you see this issue?
Not Applicable.
What are the browser driver(s) and version(s) where you see this issue?
Not Applicable.
Are you using Selenium Grid?
Not Applicable.
The text was updated successfully, but these errors were encountered: