{"action":"closed","issue":{"url":"https://api.github.com/repos/teampoltergeist/poltergeist/issues/506","labels_url":"https://api.github.com/repos/teampoltergeist/poltergeist/issues/506/labels{/name}","comments_url":"https://api.github.com/repos/teampoltergeist/poltergeist/issues/506/comments","events_url":"https://api.github.com/repos/teampoltergeist/poltergeist/issues/506/events","html_url":"https://github.com/teampoltergeist/poltergeist/issues/506","id":35749802,"number":506,"title":"Overlapping but not on screenshot","user":{"login":"ghost","id":10137,"avatar_url":"https://avatars.githubusercontent.com/u/10137?v=3","gravatar_id":"","url":"https://api.github.com/users/ghost","html_url":"https://github.com/ghost","followers_url":"https://api.github.com/users/ghost/followers","following_url":"https://api.github.com/users/ghost/following{/other_user}","gists_url":"https://api.github.com/users/ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghost/subscriptions","organizations_url":"https://api.github.com/users/ghost/orgs","repos_url":"https://api.github.com/users/ghost/repos","events_url":"https://api.github.com/users/ghost/events{/privacy}","received_events_url":"https://api.github.com/users/ghost/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-06-15T14:01:19Z","updated_at":"2015-11-14T00:59:28Z","closed_at":"2015-11-14T00:59:28Z","body":"```ruby\r\nit 'require accept terms and can download it' do\r\n    user = c :user, terms_agreed_at: nil\r\n    login user\r\n    screenshot_and_open_image\r\n    page.should have_content 'Terms of Use'\r\n    click_on 'Terms of Use'\r\n    page.response_headers['Content-Type'].should == \"application/pdf\"\r\nend\r\n```\r\n\r\n```\r\nFailures:\r\n\r\n  1) Users require accept terms and can download it\r\n     Failure/Error: click_on 'Terms of Use'\r\n     Capybara::Poltergeist::MouseEventFailed:\r\n       Firing a click at co-ordinates [343, 731.5] failed. Poltergeist detected another element with CSS selector 'html.js.no-flexbox.flexboxlegacy.canvas.canvastext.no-webgl.touch.no-geolocation.postmessage.websqldatabase.no-indexeddb.hashchange.history.draganddrop.websockets.rgba.hsla.multiplebgs.backgroundsize.borderimage.borderradius.boxshadow.textshadow.opacity.cssanimations.csscolumns.cssgradients.cssreflections.csstransforms.no-csstransforms3d.csstransitions.fontface.generatedcontent.no-video.no-audio.localstorage.sessionstorage.webworkers.applicationcache.svg.inlinesvg.smil.svgclippaths body.users section#cookie-policy div.inner p' at this position. It may be overlapping the element you are trying to interact with. If you don't care about overlapping elements, try using node.trigger('click').\r\n     # ./spec/requests/users_spec.rb:24:in `block (2 levels) in <top (required)>'\r\n```\r\n\r\nhttp://i.imgur.com/LFB1COB.png\r\n\r\nIf I disable cookie-policy template test passes\r\nhttp://i.imgur.com/aTI9O4e.png\r\n\r\nThen I use `trigger(:click)`\r\n```ruby\r\nit 'require accept terms and can download it' do\r\n    user = c :user, terms_agreed_at: nil\r\n    login user\r\n    screenshot_and_open_image\r\n    page.should have_content 'Terms of Use'\r\n    page.find('label[for=user_terms_agreed_at] a').trigger(:click)\r\n    # click_on 'Terms of Use'\r\n    page.response_headers['Content-Type'].should == \"application/pdf\"\r\n  end\r\n```\r\nFails with\r\n```\r\nFailures:\r\n\r\n  1) Users require accept terms and can download it\r\n     Failure/Error: page.response_headers['Content-Type'].should == \"application/pdf\"\r\n       expected: \"application/pdf\"\r\n            got: nil (using ==)\r\n     # ./spec/requests/users_spec.rb:25:in `block (2 levels) in <top (required)>'\r\n\r\nFinished in 4.57 seconds\r\n1 example, 1 failure\r\n```"}}