File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,17 @@ def convert_xpath_to_css(xpath):
206
206
if xpath .startswith ("(" ):
207
207
xpath = _filter_xpath_grouping (xpath )
208
208
209
- css = _get_raw_css_from_xpath (xpath )
209
+ css = ""
210
+ if "/descORself/" in xpath and ("@id" in xpath or "@class" in xpath ):
211
+ css_sections = []
212
+ xpath_sections = xpath .split ("/descORself/" )
213
+ for xpath_section in xpath_sections :
214
+ if not xpath_section .startswith ("//" ):
215
+ xpath_section = "//" + xpath_section
216
+ css_sections .append (_get_raw_css_from_xpath (xpath_section ))
217
+ css = "/descORself/" .join (css_sections )
218
+ else :
219
+ css = _get_raw_css_from_xpath (xpath )
210
220
211
221
attribute_defs = re .findall (r"(\[\w+\=\S+\])" , css )
212
222
for attr_def in attribute_defs :
You can’t perform that action at this time.
0 commit comments