Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.gargoylesoftware.htmlunit.ScriptException: Exception invoking jsxFunction_getComputedStyle #49

Open
jnicklas opened this issue Feb 10, 2011 · 8 comments

Comments

@jnicklas
Copy link

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

@bernerdschaefer
Copy link
Owner

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.

@senny
Copy link

senny commented Feb 19, 2011

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">]

@ramontayag
Copy link

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

@senny
Copy link

senny commented Mar 10, 2011

I didn't have the time to debug the issue any further, I switched back to selenium...

@ghost
Copy link

ghost commented Mar 16, 2011

I have the same error,

in view
link_to "more pie", @pie, :method => 'put', :class => "pie_a_lot"

in rspec
click_on('more pie')

@jeremy6d
Copy link

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>

@pigletto
Copy link

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

@whatbird
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants