Giter Club home page Giter Club logo

Comments (10)

jonleighton avatar jonleighton commented on July 19, 2024

check is not supposed to uncheck check boxes (see docs). For that there's an uncheck method. Does that solve your problem?

from poltergeist.

rb2k avatar rb2k commented on July 19, 2024

Oh sorry. I DID actually use the respective check/uncheck method. I should have clarified that part :)
In either way, if there is a click, the state should change. The matching tests pass in akephalos/selenium.

from poltergeist.

jonleighton avatar jonleighton commented on July 19, 2024

I can't reproduce the problem with the following test case:

    describe 'check/uncheck' do
      it 'should work' do
        @session.visit('/form')
        checkbox = @session.find(:css, '#form_pets_cat')
        checkbox.checked?.should == false
        @session.check('form_pets_cat')
        checkbox.checked?.should == true
        @session.check('form_pets_cat')
        checkbox.checked?.should == true
        @session.uncheck('form_pets_cat')
        checkbox.checked?.should == false
        @session.uncheck('form_pets_cat')
        checkbox.checked?.should == false
      end
    end

Plus, check/uncheck is covered by the Capybara integration tests too.

Have you tried taking screenshots to see if anything obvious sticks out? If you could create a reproducible test case that would help a lot.

Thanks

from poltergeist.

rb2k avatar rb2k commented on July 19, 2024

They LOOK disabled: screenshot
The weird thing is, that if I go to that page manually, they aren't. This might be ?CSS related? though

edit: html dump

from poltergeist.

jonleighton avatar jonleighton commented on July 19, 2024

You could try using evaluate_javascript to look at the disabled attribute of one of the checkboxes?

from poltergeist.

rb2k avatar rb2k commented on July 19, 2024

thanks for the hint, I'll try that

from poltergeist.

rb2k avatar rb2k commented on July 19, 2024

ok, they are NOT disabled.
It is kind of a strange behavior:

doesn't work:

page.check(feature_id_hash[feature])

works:

page.evaluate_script("document.getElementById('#{feature_id_hash[feature]}').checked=true")

from poltergeist.

jonleighton avatar jonleighton commented on July 19, 2024

Please could you confirm if this is still a problem (against master)? I think it might be the same as #8, which is now fixed.

from poltergeist.

jonleighton avatar jonleighton commented on July 19, 2024

I'm going to close this. Please reopen if it still exists, but by the looks of it it's the same bug as #8. Thanks.

from poltergeist.

rb2k avatar rb2k commented on July 19, 2024

I would assume so, I'll come nagging again if it's still broken :)

from poltergeist.

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.