{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/7297c7484eb236c1b961b788f7a37112?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"7297c7484eb236c1b961b788f7a37112","url":"https://api.github.com/users/rb2k","login":"rb2k","id":9519},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-02T19:27:35Z","comments":5,"closed_at":null,"url":"https://api.github.com/repos/jonleighton/poltergeist/issues/5","body":"I have the feeling that .check() doesn't work for me on poltergeist:\r\n\r\nI modified the set() method a bit to get feedback, I also changed\r\n\r\n    if value && !checked? || !value && checked?\r\nto\r\n  \r\n    if value != checked?\r\n\r\n\r\nHere's the modified method:\r\n\r\n     def set(value)\r\n      if tag_name == 'input'\r\n        type = self[:type]\r\n        if type == 'radio'\r\n          click\r\n        elsif type == 'checkbox'\r\n          if value != checked?                      \r\n            puts \"Checkbox state before click: '#{checked?}'.\"\r\n            click\r\n            puts \"Checkbox state after click: '#{checked?}'.\"\r\n          end\r\n        elsif type == 'file'\r\n          command :select_file, value\r\n        else\r\n          command :set, value\r\n        end\r\n      elsif tag_name == 'textarea'\r\n        command :set, value\r\n      end\r\n    end\r\n\r\n\r\n\r\nHere is the output when trying to uncheck a checkbox:\r\n\r\n    Checkbox state before click: 'true'.\r\n    Checkbox state after click: 'true'.\r\n\r\nSo the click doesn't really seem to do the trick as far as I can see","html_url":"https://github.com/jonleighton/poltergeist/issues/5","title":"check() doesn't work","number":5,"id":2122649,"created_at":"2011-11-02T15:32:35Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/2940bc7d4506f3e099e3dcc32a412b98?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2940bc7d4506f3e099e3dcc32a412b98","url":"https://api.github.com/users/jonleighton","login":"jonleighton","id":1979},"updated_at":"2011-11-02T19:27:35Z","url":"https://api.github.com/repos/jonleighton/poltergeist/issues/comments/2608234","body":"You could try using `evaluate_javascript` to look at the `disabled` attribute of one of the checkboxes?","id":2608234,"created_at":"2011-11-02T19:27:35Z"}}