File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,8 @@ def convert_xpath_to_css(xpath):
172
172
if xpath [0 ] != '"' and xpath [- 1 ] != '"' and xpath .count ('"' ) % 2 == 0 :
173
173
xpath = _handle_brackets_in_strings (xpath )
174
174
xpath = xpath .replace ("descendant-or-self::*/" , "descORself/" )
175
+ if len (xpath ) > 3 :
176
+ xpath = xpath [0 :3 ] + xpath [3 :].replace ('//' , '/descORself/' )
175
177
176
178
if " and contains(@" in xpath and xpath .count (" and contains(@" ) == 1 :
177
179
spot1 = xpath .find (" and contains(@" )
@@ -211,7 +213,9 @@ def convert_xpath_to_css(xpath):
211
213
css = css .replace (" descORself > " , ' ' )
212
214
css = css .replace ("/descORself/*" , ' ' )
213
215
css = css .replace ("/descORself/" , ' ' )
216
+ css = css .replace ("descORself > " , '' )
214
217
css = css .replace ("descORself/" , ' ' )
218
+ css = css .replace ("descORself" , ' ' )
215
219
css = css .replace ("_STAR_=" , "*=" )
216
220
css = css .replace ("]/" , "] " )
217
221
css = css .replace ("] *[" , "] > [" )
You can’t perform that action at this time.
0 commit comments