capybara-webkit version: v1.14.0 (works fine on v1.13.0)
capybara version: any but I run it on 2.13.0
I've got helper method:
def get_style(node)
path = node.path
result = page.evaluate_script <<-EOS.squish
var node = document.evaluate("#{path}", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
window.getComputedStyle(node);
EOS
pp page.driver.console_messages
result
end
output from console shows:
[{:line_number=>499,
:message=>
"NoModificationAllowedError: DOM Exception 7: An attempt was made to modify an object where modifications are not allowed.",
:source=>"undefined"}]
When I simulate wrapping result in real app in the browser the error is more descriptive (the _result passed to wrapper is a CSSStyleDeclaration in my case):
Uncaught DOMException: Failed to set the 'align-content' property on 'CSSStyleDeclaration': These styles are computed, and therefore the 'align-content' property is read-only.
capybara-webkit
version:v1.14.0
(works fine onv1.13.0
)capybara
version: any but I run it on2.13.0
I've got helper method:
output from console shows:
I believe it's due to this change.
When I simulate wrapping result in real app in the browser the error is more descriptive (the
_result
passed to wrapper is aCSSStyleDeclaration
in my case):