Added
Node#stylereads computed styles in one call, Capybara no longer falls back to its own script after
NotImplementedErroropen_new_window(:window)opens a window instead of a tab, an unknown kind raisesArgumentErrorbrowser.go_totakes the keywords of Ferrum'sgo_to, likereferrer:andtimeout:, it accepted only the URL:url_blocklistand:url_allowlistdriver options as aliases for:url_blacklistand:url_whitelist[#330]clear:set option like Selenium's::noneappends,:backspacedeletes with Backspace, an Array of keys is pressed
first. Options Cuprite doesn't support warn again
Changed
- Text inputs and textareas are filled with real key presses like Selenium, values over 30 characters type the first 4
and last 3 and set the rest from JS.minlengthvalidates,\nsubmits a single-input form, andrapid:is supported CUPRITE_DEBUGis renamed toCUPRITE_LOG, which takesFERRUM_LOGvalues and passes them on,CUPRITE_DEBUGis
deprecated and acts asCUPRITE_LOG=*.FERRUM_DEBUGis deprecated in Ferrum 0.21trigger("click")watches for a navigation as long as real clicks, Ferrum'sFERRUM_NAVIGATION_WAIT- Clicks, hovers and drags find their point with Ferrum's
node.pinpointinstead offind_position, deprecated in
Ferrum 0.21, and a click passes an offset only when Capybara givesxandy[rubycdp/ferrum#726] - Calls Ferrum's
go_toandnode.scrollinstead ofgotoandscroll_into_view, deprecated in Ferrum 0.21, and
page.goto/page.gowarn through Ferrum's deprecation instead of being Cuprite's own aliases [rubycdp/ferrum#717] Driver#current_urlandDriver#titleread Ferrum'surlandtitleof the window, notcurrent_urland
current_titledeprecated in Ferrum 0.21 [rubycdp/ferrum#687]:js_errorsis handled by Cuprite instead of being passed to Ferrum, which deprecates it. Behavior is the same
[rubycdp/ferrum#688]:pending_connection_errorsis handled by Cuprite instead of being passed to Ferrum, which deprecates it.visit
raisesCapybara::Cuprite::PendingConnectionsError, a subclass of Ferrum's, and rescuing Ferrum's warns
[rubycdp/ferrum#689]- Dialogs are handled with Ferrum's
on(:dialog)instead of the raw CDP event, so Ferrum's default handler no longer
accepts them first and loses dismissals and prompt responses [rubycdp/ferrum#703] - A closed window is removed from Ferrum's context, which returns a copy of its targets, so
close_windowno longer
leaves it listed until Chrome reports it destroyed [rubycdp/ferrum#707] find_cssandfind_xpathanswer Capybara's finder hints in the call that finds the nodes, so Capybara no longer
asks each node for its visibility and text. As with Selenium, a lazily filtered result keeps the answers [#347]- Cuprite's own options are kept in
Browser::Settingsinstead of reopeningFerrum::Browser::Options, so
browser.optionsis Ferrum's alone andbrowser.default_user_agentis Chrome's even withemulate: trigger("click")waits for the navigation it starts with Ferrum'sawait_navigation, notwait_for_navigation!
deprecated in Ferrum 0.21.go_back,go_forwardandrefreshno longer raise when the page doesn't load in time
[rubycdp/ferrum#716]:url_blacklistand:url_whitelistdriver options set together raiseArgumentErrorlike the setters, the
blacklist won
Fixed
- An empty
url_blacklist=unblocks the current page, it kept blocking until the next page url_blacklist=andurl_whitelist=raise before saving the list when the other one is set, so new windows no
longer get the list that raisedsetwith an Array on a field withoutmultipleraisesArgumentErrorlike Selenium, it typed the Array as text- Number fields are typed with real key presses like text fields, so
clear:andrapid:apply, their value was set
from JS with no key events valueof a multiple select includes the selected options in an<optgroup>, it returned only the othersNode#send_keysfocuses an element without focus instead of clicking it, so a checkbox isn't toggled and a link isn't
followed, and the keys go to the end of a filled field instead of where the click put the caret- Setting a text field to a value ending in
\nno longer fails now and then withFerrum::NoExecutionContextError
when the form submits and the page navigates away before the field refocuses response_headersare looked up case-insensitively as with rack_test,["Content-Type"]returnednil- A click on a node the page removes before the hit test raises
ObsoleteNode, which Capybara retries, instead of
Ferrum::JavaScriptError: node.getRootNode(...).elementFromPoint is not a function[#359] Driver#reset!andDriver#quitdon't launch Chrome when no browser has started, so a failed launch doesn't
launch again during teardown- The
:emulatedevice user agent is set with Ferrum'snetwork.emulate, so clearing its other overrides keeps the
device user agent instead of falling back to Chrome's
Removed
- Methods deprecated in 0.20, see its Deprecated section for replacements
- String patterns for
url_blacklist/url_whitelist, deprecated in 0.15, raiseArgumentError, pass regexps CUPRITE_MODAL_WAIT,accept_*/dismiss_*find the dialog as soon as it's answered instead of checking for it on
an intervalCUPRITE_TRIGGER_CLICK_WAIT, use Ferrum'sFERRUM_NAVIGATION_WAIT, which real clicks use too