Skip to content

Commit 6f0d20e

Browse files
committed
Fix the xpath-to-css-selector converter
1 parent 0177b93 commit 6f0d20e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

seleniumbase/fixtures/xpath_to_css.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
_sub_regexes = {
88
"tag": r"([a-zA-Z][a-zA-Z0-9]{0,10}|\*)",
99
"attribute": r"[.a-zA-Z_:][-\w:.]*(\(\))?)",
10-
"value": r"\s*[\w/:][-/\w\s,:;.]*"
10+
"value": r"\s*[\w/:][-/\w\s,:;.\S]*"
1111
}
1212

1313
_validation_re = (
@@ -23,7 +23,7 @@
2323
r"(?P<contained>contains\((?P<cattr>@?%(attribute)s,\s*[\"\']"
2424
r"(?P<cvalue>%(value)s)[\"\']\))"
2525
r")\])?"
26-
r"(\[(?P<nth>\d)\])?"
26+
r"(\[(?P<nth>\d+)\])?"
2727
r")"
2828
r")" % _sub_regexes
2929
)

0 commit comments

Comments
 (0)