GithubHelp home page GithubHelp logo

Comments (8)

bernerdschaefer avatar bernerdschaefer commented on June 15, 2024

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.

from akephalos.

senny avatar senny commented on June 15, 2024

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

from akephalos.

ramontayag avatar ramontayag commented on June 15, 2024

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

from akephalos.

senny avatar senny commented on June 15, 2024

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

from akephalos.

 avatar commented on June 15, 2024

I have the same error,

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

in rspec
click_on('more pie')

from akephalos.

jeremy6d avatar jeremy6d commented on June 15, 2024

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>

from akephalos.

pigletto avatar pigletto commented on June 15, 2024

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

from akephalos.

whatbird avatar whatbird commented on June 15, 2024

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

from akephalos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.