com.gargoylesoftware.htmlunit.ScriptException: Exception invoking jsxFunction_getComputedStyle
Getting this error when trying to run features in Akephalos. I don't have time to investigate this much further, but thought I'd post it here in case it rings a bell.
Using akephalos 0.2.5, edge capybara, fails on both Ruby 1.8.7 and 1.9.2.
Stack trace: http://pastie.org/1549157
Appears htmlunit doesn't like something about the javascript. I find it easiest to debug these issues by making htmlunit's logging more verbose. See #50 for being able to configure this, but for now I usually bundle open and then change:
# lib/akephalos/htmlunit.rb
java.lang.System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "fatal")
to something like:
java.lang.System.setProperty("org.apache.commons.logging.simplelog.defaultlog", "debug")
The debug level produces a lot (A LOT) of noise, but can definitely help pinpoint where the issue is.
I receive the same exception when clicking on a link with a data-method="post" attribute. Switching the log-level to debug resulted in:
.2011/02/19 14:22:19:145 MEZ [DEBUG] HtmlElement - Firing Event mousedown (Current Target: HTMLElement for HtmlAnchor[<a href="/exports?export=type1" data-method="post" rel="nofollow">]);
2011/02/19 14:22:19:328 MEZ [WARN] SelectorSpecificity - Unhandled CSS selector type for specificity computation: '11'.
2011/02/19 14:22:19:330 MEZ [WARN] SelectorSpecificity - Unhandled CSS selector type for specificity computation: '11'.
2011/02/19 14:22:19:369 MEZ [DEBUG] HtmlElement - Firing Event mouseup (Current Target: HTMLElement for HtmlAnchor[<a href="/exports?export=type1" data-method="post" rel="nofollow">]);
2011/02/19 14:22:19:370 MEZ [DEBUG] HtmlElement - Firing Event click (Current Target: HTMLElement for HtmlAnchor[<a href="/exports?export=type1" data-method="post" rel="nofollow">]);
2011/02/19 14:22:19:381 MEZ [DEBUG] HTMLElement - Found attribute for evaluation of property "data-method" for of HTMLElement for HtmlAnchor[<a href="/exports?export=type1" data-method="post" rel="nofollow">]
2011/02/19 14:22:19:381 MEZ [DEBUG] HTMLElement - Found attribute for evaluation of property "data-method" for of HTMLElement for HtmlAnchor[<a href="/exports?export=type1" data-method="post" rel="nofollow">]
senny, what did you do to get around this?
Unfortunately I've stared at this output for an hour to no avail. I'm getting to errors: one in this ticket, and another https://github.com/bernerdschaefer/akephalos/issues#issue/55
I didn't have the time to debug the issue any further, I switched back to selenium...
I have the same error,
in view link_to "more pie", @pie, :method => 'put', :class => "pie_a_lot"
in rspec click_on('more pie')
Yeah, I'm getting this when telling capybara to click on a link issuing a POST request. It's not even a JS link. As in:
<a href="/therapy_sessions?time=1%3A00+PM" data-method="post" rel="nofollow">1:00 PM</a>
I get this error if my page tested using akephalos icludes css file that contains: .selectbox.items li>.item{color:#000;cursor:default;display:block;padding:4px 6px;text-decoration:none;}
The problem is with child selector: li>.item
i got this issue and traced it back to a spot where jQuery was being used to modify an element that was not yet attached the DOM. something like:
jQuery("<div id='new-element'></div>").hide().etc()
which i could work around