module Capybara::WithElementHandlePatch

Public Instance Methods

with_playwright_element_handle(&block) click to toggle source
# File lib/capybara/playwright/node.rb, line 18
def with_playwright_element_handle(&block)
  raise ArgumentError.new('block must be given') unless block

  if native.is_a?(::Playwright::ElementHandle)
    block.call(native)
  else
    raise "#{native.inspect} is not a Playwirght::ElementHandle"
  end
end