gems cuprite 0.19

one hour ago

Added

  • :emulate driver option to emulate a device listed in Chrome DevTools with its user agent, e.g.
    emulate: :iphone_14, along with :mobile and :scale_factor options it sets, kept across window resizes [#216]
  • Node#drag_to accepts x: and y: to drop at an offset from the target, measured from its center or top left like
    click, so drop targets that tell the upper half from the lower one can be driven [#325]

Changed

  • Ferrum is bumped to ~> 0.19.1
  • --disable-web-security is added to the browser options, since Ferrum dropped it from its defaults. Tests keep
    reaching into cross-origin frames, e.g. current_url within a frame from another origin [rubycdp/ferrum#472]
  • Change Node#send_keys to avoid triggering click on an already focused element. send_keys(:tab) without an
    element no longer clicks the middle of the page first, so Tab moves focus from the start of the page, and Capybara's
    #active_element and focused: specs run in the suite [#327]

Fixed

  • Node#drag_to fired dragleave right before drop on an HTML5 drop target, which browsers never do, so libraries such
    as Pragmatic drag and drop dropped onto nothing. A drag now ends with drop if the target accepted it, otherwise
    with dragleave [#325]
  • window_size: nil raised Ferrum::BrowserError: Invalid parameters on every page instead of leaving the window
    size to Chrome, so start-maximized couldn't be used [#278]
  • Driver#reset! kept the page it had cached when the browser failed to reset, so every later example raised
    Session with given id not found or Browser is dead or given window is closed instead of starting on a fresh
    page [#274], [rubycdp/ferrum#641]
  • Node#visible? reported an open popover or modal dialog as hidden when an ancestor had opacity: 0 [#328]
  • Driver#window_handles listed the web workers a page spawned as windows, so window_opened_by raised
    opened 2 windows instead of 1 [#326]
  • Node#select_option and Node#unselect_option didn't fire the input event on the select [#223]
  • Node#trigger silently dispatched nothing for events other than mouse, focus and submit, such as input,
    change or custom events [#197]
  • Node#set with an empty string cleared a text field without firing the input event [#164]
  • Finders with exact_text: true raised InvalidSelector because Capybara appended an empty [] predicate to the
    XPath [#256]

Don't miss a new cuprite release

NewReleases is sending notifications on new releases.