You've already forked SeleniumHQ.selenium.py
[py]: Fix issue with LocalFileDetector
returning the path for files that do not exist
NOKEYCHECK=True GitOrigin-RevId: ca3203128f0a5d65342d5e80b62dee10d29d2afb
This commit is contained in:
@@ -46,6 +46,7 @@ class LocalFileDetector(FileDetector):
|
||||
|
||||
def is_local_file(self, *keys: AnyKey) -> Optional[str]:
|
||||
file_path = "".join(keys_to_typing(keys))
|
||||
|
||||
with suppress(OSError):
|
||||
_ = Path(file_path).is_file()
|
||||
return file_path
|
||||
if Path(file_path).is_file():
|
||||
return file_path
|
||||
|
Reference in New Issue
Block a user