module Capybara::CapybaraObscuredPatch
Constants
- OBSCURED_OR_OFFSET_SCRIPT
Public Instance Methods
capybara_obscured?(x: nil, y: nil)
click to toggle source
# File lib/capybara/playwright/node.rb, line 46 def capybara_obscured?(x: nil, y: nil) res = evaluate(OBSCURED_OR_OFFSET_SCRIPT, arg: [x, y]) return true if res == true # ref: https://github.com/teamcapybara/capybara/blob/f7ab0b5cd5da86185816c2d5c30d58145fe654ed/lib/capybara/selenium/driver.rb#L182 frame = owner_frame return false unless frame.parent_frame frame.frame_element.capybara_obscured?(x: res['x'], y: res['y']) end