Skip to content

Commit a5850c2

Browse files
authored
Merge pull request #180 from autoscrape-labs/fix/find-method
fix: refine selector condition to include attributes check
2 parents 34295b4 + fd7e522 commit a5850c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydoll/elements/mixins/find_elements_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def _get_by_and_value( # noqa: PLR0913, PLR0917
305305
}
306306
provided_selectors = {key: value for key, value in simple_selectors.items() if value}
307307

308-
if len(provided_selectors) == 1 and not text:
308+
if len(provided_selectors) == 1 and not text and not attributes:
309309
key, value = next(iter(provided_selectors.items()))
310310
by = by_map[key]
311311
return by, value

0 commit comments

Comments
 (0)