- Node helpers on
Capybara::Cuprite::Browser(value,set,select,visible_text,drag, etc.) are private, use Capybara's node API ornode.native.nodefor Ferrum's Browser#findis private,Browser#active_elementandBrowser#within_windoware removed, use Capybara'sactive_elementandwithin_windowDriver#find,Driver#screen_size,Driver#within_window,Node#find,Node#commandandNode#descriptionare private, usenode.node.descriptionfor the latter- Ferrum's
base_urlfollowsCapybara.app_host(or Capybara's server) and the visited page, sopage.driver.browser.cookiesdoesn't needdomain:
- Deprecated methods print a warning and will be removed in 0.21
Driver#body, useDriver#htmlinsteadDriver#backandDriver#forward, useDriver#go_backandDriver#go_forwardinsteadDriver#window_handleandBrowser#window_handle, usecurrent_window_handleinsteadDriver#render, useDriver#save_screenshotinsteadDriver#render_base64, usepage.driver.browser.screenshotorpage.driver.browser.pdfinsteadDriver#zoom_factor=andDriver#paper_size=, passscale:,paper_width:andpaper_height:tosave_screenshotinsteadDriver#resizeandDriver#resize_window, usepage.current_window.resize_toinsteadDriver#authorizeandDriver#basic_authorize, usepage.driver.browser.network.authorizeinsteadDriver#headers,headers=,add_headersandadd_header, usepage.driver.browser.headersinsteadDriver#cookies,set_cookie,remove_cookieandclear_cookies, usepage.driver.browser.cookiesinsteadDriver#network_traffic,clear_network_traffic,wait_for_network_idleandclear_memory_cache, usepage.driver.browser.networkinstead.network.trafficincludes blocked requestsDriver#click, usepage.driver.browser.mouse.clickinsteadDriver#scroll_to, usepage.scroll_toinsteadDriver#wait_for_reload,timeout,timeout=,device_pixel_ratioandviewport_size, use the same methods onpage.driver.browserinsteadDriver#set_proxy, pass the:proxyoption to the driver insteadDriver#restartandNode#browser, usepage.driver.browser.restartandpage.driver.browserinsteadBrowser#visitandBrowser#status_code, usegotoandnetwork.statusinsteadNode#send_key, useNode#send_keysinsteadNode#parents, use Capybara'sancestorinsteadNode#property, usenode.native.node.propertyinstead
Node#drag_towithdrop_modifiers:holds the modifiers while moving to the target and sends keydown and keyup for them, like Selenium does. They used to be set only on mouseup [rubycdp/ferrum#581]- Resizing the window reset hover and pointer overrides passed with
--blink-settings, so@media (hover: hover)stopped matching on headless Linux [#282, rubycdp/ferrum#664]
- Ruby 3.1 support, Cuprite requires Ruby 3.2 or newer
format: :pdfinDriver#save_screenshot, broken since Ferrum 0.6. A.pdfpath renders a PDFDriver#source, it always raisedNotImplementedError. Usepage.htmlorpage.sourceinsteadCapybara::Cuprite::Cookie, it was never loaded.Driver#cookiesreturnsFerrum::Cookies::CookieobjectsPage#frame_name, it was unusedPage#reset_modalsandBrowser#reset_modals, they were unusedBrowser#switch_to_frame,find_modal,accept_confirm,dismiss_confirm,accept_promptanddismiss_prompt, they were internal delegates toPageBrowser#browser_error, it was used only in specsNode#as_jsonandNode#to_json, they were unusedDriver#pause, usebinding.irbwithheadless: false, orDriver#debug
: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 likeclick, so drop targets that tell the upper half from the lower one can be driven [#325]
- 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]
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 raisedSession 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_byraisedopened 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]
- Support time inputs [#245]
- Add initial support for shadow_root [#234]
- Support
Capybara::Cuprite::Node#rect[#276] - Extend
Node#setwith thedatetime-localinput type [#295] - Support HTML5 drag-and-drop and drag modifier keys in
Node#drag_to[#315] - Support
Element#dropfor files and strings [#316] - Add
:raise_on_unhandled_modalbrowser option to raise instead of warn on an unhandled modal [#320]
- Bump Ferrum dependency to
~> 0.18.0
- Ensure the node has focus before setting value [#280]
- Raise
ObsoleteNodeinstead of silently acting on a node that got disconnected from the DOM between being found and being used [#239] Capybara::Cuprite::Node#send_keysignores empty or nil keys instead of raising, matching the Selenium and rack_test drivers [#313]Driver#switch_to_frameaccepts aCapybara::Cuprite::Nodeinstead of only a wrappedCapybara::Node::Element[#312]- Report
tag_nameas"ShadowRoot"for shadow root nodes [#318] - Treat non-summary descendants of a closed
<details>element as non-visible [#317] switch_to_windowsendsTarget.activateTargetso Chrome reactivates the window's renderer immediately instead of leaving it backgrounded, which could stall the next input command for several seconds [#321]Node#setfiresinputandchangeevents for acolorinput, since its value can only be set via JavaScript and never gets them naturally [#229]- Generate a
FocusEvent(not a genericEvent) for focus-related events (blur,focus,focusin,focusout), matching real browser behavior [#272]
:inspectoroption is retired
- Correctly open devtools page when calling
debug[#296, #297]
0.16 - (May 10, 2025)
wait_for_network_idledoesn't raise error, instead simply returnsnil
- Assigning broken unicode to a node directly from JS can lead to
JSON::ParserError: incomplete surrogate pair at ...error
0.15.1 - (Jun 15, 2024)
- Support for
Driver#send_keys, the:focusedfilter, andDriver#active_element[#261]
@window_sizeattribute is moved from Ferrum, viewport size is still inherited [#253]- Compatibility with latest Ferrum. Browser instance is not passed everywhere now [#254]
Cuprite::Browsermethods are located inOptions.#window_size#url_blacklist#url_whitelist#timeout
Page#newarguments are changed toclient, context_id:, target_id:Target#attached?renamed toTarget#connected?- Ferrum doesn't restart browser automatically, Cuprite does
Browser#close_windowremoves target id asap from the target list
- Detect whether element is in the viewport and clickable before click [#251]
- Remember parentNode in case onChange callback mutates DOM [#227]
- Correctly open devtools page when calling
debug[#252]
0.15 - (Nov 4, 2023)
url_blocklist | url_allowlistaliases forwhitelist | blacklist- Support steps option for dragging [#182]
- Drop support for Ruby 2.6 [#173]
- Support for
whitelist | blacklistthrough Ferrum [#173]
Capybara::Cuprite::Driversupport custom:save_pathoption, not onlyCapybara.save_path[#217]- Send correct inputType when typing [#244]
- Send instance of KeyboardEvent on keyup/keydown/keypress [#246]
0.14.3 - (Nov 12, 2022)
- Compatibility with latest Ferrum
Cuprite::Browser#timeout=passes value to a page- Use
Ferrum::Browser::Optionsinstead of hash - Don't call
browser.network.authorizeif there are no credentials
- Expand
Capybara.save_path
0.14.2 - (Oct 5, 2022)
- Files in gemspec
0.14.1 - (Oct 5, 2022)
- Use
Ferrum::Utilsinstead ofFerrum
0.14 - (Oct 5, 2022)
- Implement Browser#drag and #drag_by
- Drop Capybara 2 support
- Refactoring: delegate methods to browser
- Bump Ruby to 2.6
- Add rubocop
- Compatibility with latest Ferrum
- Fix ruby warning
0.13 - (Mar 11, 2021)
- Compatibility with latest Ferrum
- Fix cannot read property 'parentNode' of null
0.12 - (Feb 24, 2021)
- Compatibility with latest Ferrum
- Fix setting input type color
Ferrum::NodeNotFoundErrorshould be treated by capybara
0.11 - (Jul 29, 2020)
Capybara::Cuprite::Driver#wait_for_reloadwait until the whole page is reloaded or raise a timeout error.
- Compatibility with latest Ferrum
0.10 - (Apr 7, 2020)
- Ability to pass binding to debug method
page.driver.debug(binding) - Support for click delay and offset position
- Update README
- Command line being slow after debugging with
page.driver.debugand exiting it
0.9 - (Jan 28, 2020)
Capybara::Cuprite::Driver.wait_for_network_idlenatively waits for network idle and if there are no active connections returns or raisesTimeoutErrorerror.- CUPRITE_DEBUG env should turn debug mode on as FERRUM_DEBUG
- Set value for input type range
- No monkey-patching for
Capybara::Cuprite::Page
- LocalJumpError in on(:request) callback
0.8 - (Oct 29, 2019)
- Use Ferrum contexts to work with pages.
Capybara::Cuprite::Browser#page#reset#quit#window_handle#window_handles#switch_to_window#close_window
Capybara::Cuprite::Page#title#active_frameTRIGGER_CLICK_WAIT
- Accept modals by default with warning
Capybara::Cuprite::Page#find_modaluse browser timeout
0.7.1 - (Sep 20, 2019)
url_whitelist,url_blacklist,status_code,network_traffic,clear_network_traffic,response_headers,clear_memory_cache,basic_authorizefixed to use dedicated network namespace to work with network
0.7.0 - (Sep 12, 2019)
- Separate
FerrumandCuprite