Added
:emulatedriver option to emulate a device listed in Chrome DevTools with its user agent, e.g.
emulate: :iphone_14, along with:mobileand:scale_factoroptions it sets, kept across window resizes [#216]Node#drag_toacceptsx:andy: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-securityis added to the browser options, since Ferrum dropped it from its defaults. Tests keep
reaching into cross-origin frames, e.g.current_urlwithin a frame from another origin [rubycdp/ferrum#472]- Change
Node#send_keysto avoid triggeringclickon 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_elementandfocused:specs run in the suite [#327]
Fixed
Node#drag_tofireddragleaveright beforedropon an HTML5 drop target, which browsers never do, so libraries such
as Pragmatic drag and drop dropped onto nothing. A drag now ends withdropif the target accepted it, otherwise
withdragleave[#325]window_size: nilraisedFerrum::BrowserError: Invalid parameterson every page instead of leaving the window
size to Chrome, sostart-maximizedcouldn'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 foundorBrowser is dead or given window is closedinstead of starting on a fresh
page [#274], [rubycdp/ferrum#641]Node#visible?reported an open popover or modal dialog as hidden when an ancestor hadopacity: 0[#328]Driver#window_handleslisted the web workers a page spawned as windows, sowindow_opened_byraised
opened 2 windows instead of 1[#326]Node#select_optionandNode#unselect_optiondidn't fire theinputevent on the select [#223]Node#triggersilently dispatched nothing for events other than mouse, focus andsubmit, such asinput,
changeor custom events [#197]Node#setwith an empty string cleared a text field without firing theinputevent [#164]- Finders with
exact_text: trueraisedInvalidSelectorbecause Capybara appended an empty[]predicate to the
XPath [#256]