Skip to content

Commit c20a798

Browse files
committed
Update path response
1 parent 139cc06 commit c20a798

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/capybara/selenium/node.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ def attrs(*attr_names)
494494
var pos, tempitem2;
495495
496496
if (el.getRootNode && el.getRootNode() instanceof ShadowRoot) {
497-
return ": Shadow DOM element - no XPath :"
498-
};
497+
return "(: Shadow DOM element - no XPath :)";
498+
};
499499
while(el !== xml.documentElement) {
500500
pos = 0;
501501
tempitem2 = el;

lib/capybara/spec/session/node_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@
418418
return root.shadowRoot.querySelector('span');
419419
})(arguments[0])
420420
JS
421-
expect(element.path).to eq ": Shadow DOM element - no XPath :"
422-
end
421+
expect(element.path).to eq '(: Shadow DOM element - no XPath :)'
422+
end()
423423
end
424424

425425
describe '#trigger', requires: %i[js trigger] do

0 commit comments

Comments
 (0)