Comments (10)
check
is not supposed to uncheck check boxes (see docs). For that there's an uncheck
method. Does that solve your problem?
from poltergeist.
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.
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.
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.
You could try using evaluate_javascript
to look at the disabled
attribute of one of the checkboxes?
from poltergeist.
thanks for the hint, I'll try that
from poltergeist.
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.
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.
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.
I would assume so, I'll come nagging again if it's still broken :)
from poltergeist.
Related Issues (20)
- React event not triggered [help] HOT 2
- Capybara::Poltergeist::TimeoutError in some environments HOT 23
- ReferenceError: Can't find variable: Audio HOT 1
- React components not loading HOT 1
- Following jQuery line of code does not work in anything above v1.8.1 HOT 8
- Typo in keys method HOT 1
- Version of JS supported HOT 1
- Broken rails UJS loading when use arrow functions HOT 1
- Timeout occurs causing all following javascript tests to fail. HOT 3
- Capybara::Poltergeist::StatusFailError on 302 redirects with port numbers HOT 2
- Future of Poltergeist HOT 14
- Screenshot is not created HOT 1
- Authz request header missing HOT 5
- User agent does not persist across windows HOT 3
- Capybara::Poltergeist::TimeoutError when running CI tests HOT 7
- current_url returns empty string on about:blank HOT 3
- page.current_path always root HOT 2
- Possible make a method that check if JS Alert exist
- TypeError When dealing with link clicks via Capybara::Session HOT 2
- Capybara::Poltergeist::StatusFailError: failed to reach server (but manually I can connect perfectly) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poltergeist.