Skip to content

Releases: rubycdp/ferrum

0.15

17 Feb 11:13
Compare
Choose a tag to compare

Added

  • Ferrum::Page#disable_javascript disables the JavaScript from the HTML source [#407]
  • Ferrum::Page#set_viewport emulates the viewport [#406]
  • Ferrum::Downloads [#416]
    • #files information about downloaded files
    • #wait wait for file download to be completed
    • #set_behavior where and whether to store file
  • Browser::Client#command accepts :async parameter [#433]
  • Ferrum::Browser introduce :flatten mode with one connection and sessions [#434]
  • Support for ping requests [#417]
  • Ferrum::Browser introduce :ws_url option to set external websocket for a browser [#435]

Changed

  • Ferrum::Page#screeshot accepts :area option [#410]
  • Resizing page on creation is gone and moved to Cuprite [#427]
  • Min Ruby version is 2.7
  • Refactored internal API of Ferrum::Browser, Ferrum::Page, Ferrum::Context, Ferrum::Contexts, Ferrum::Target
    instead of passing browser and making cyclic dependency on the browser instance, we pass now a thin client [#431]
  • Bump websocket-driver to ~> 0.7 [#432]
  • Got rid of Concurrent::Async in Ferrum::Browser::Subscriber [#432]
  • Ferrum::Page#set_window_bounds is renamed to Ferrum::Page#window_bounds=
  • Ferrum::Page get right client from the Target and passes it down everywhere [#433]
  • Ferrum::Network::InterceptedRequest accepts Ferrum::Browser::Client instead of Ferrum::Page [#433]
  • Ferrum::Browser::Client -> Ferrum::Client [#433]

Fixed

  • Exceptions within .on() were swallowed by a thread pool of Concurrent::Async [#432]
  • Ferrum::Context#add_target puts wrong target to pendings sometimes [#433]
  • Leaking connection descriptors in tests and after browser quit [#433]
  • Check if network exchange exists before manipulating it [#442]

0.14

15 Sep 06:52
Compare
Choose a tag to compare

Added

  • Ferrum::Page#device_pixel_ratio returns the ratio of the resolution in physical pixels to the
    resolution in CSS pixels for the current display device.
  • Ferrum::Network#cache(disable: true | false) whether or not to use cache for every request
  • Ferrum::Network::Exchange#redirect? determines if the exchange is a redirect
  • Ferrum::Network::Exchange#xhr? determines if the exchange is XHR
  • Ferrum::Network::Request#xhr? determines if the request is XHR
  • Ferrum::Network::Response#loaded? returns true if the response is fully loaded
  • Ferrum::Network::Response#redirect? returns true if the response is a redirect
  • Ferrum::Node#in_viewport? checks if the element in viewport (optional argument scope as Ferrum::Node)
  • Ferrum::Node#scroll_into_view - scrolls to element if needed (when it's not in the viewport)
  • Ferrum::Cookies#each - is now Enumerable and supports each method
  • Ferrum::Cookies::Cookie
    • #priority
    • #sameparty?
    • #source_scheme
    • #source_port
    • #to_s
    • #to_h
  • Ferrum::Network::Request#to_h
  • Ferrum::Network::Response#to_h

Fixed

  • Ferrum::Network::Exchange#finished? returns true only fully loaded responses
  • Ferrum::Page#resize set deviceScaleFactor as 0 by default [#330]
  • Ferrum::Network#intercept silently discards unknown resource_types [#313]
  • Truncated Chrome WS URL results in Ferrum::DeadBrowserError [#327]
  • Websocket connection remains indefinitely in :connecting state and causes TimeoutError [#329]
  • Exchange#navigation_request? Handle nil request [#339]
  • Raise Ferrum::StatusError for any top frame navigation error [#341]
  • Ferrum::Network::Response#loaded? for redirect response [#338]

0.13

12 Nov 08:55
Compare
Choose a tag to compare

Added

  • Ferrum::Browser::VersionInfo
  • Ferrum::Browser
    • #version requests the browser's version information.
    • #create_page(proxy: { host: "x.x.x.x", port: "8800", user: "user", password: "pa$$" })
      proxy option, supports creating a page in a new context that uses proxy settings.
  • Ferrum::Page#timeout = n page supports its own timeout
  • Ferrum::Frame#execution_id returns execution context id and doesn't raise error
  • Ferrum::Frame#execution_id! returns execution context id and raises error when times out on borrowing

Changed

Fixed

  • Ferrum::Keyboard
    • #up, #down accept only one key.
  • Ferrum::Page#goto fixed undefined method url for nil:NilClass when page times out and there are pending requests.
  • Runtime.consoleAPICalled didn't show log messages
  • Ferrum::Page#subscribe_frame_detached added to clean up old frames
  • Ferrum::Proxy was hanging at the exit due to issue in Webrick
  • Ferrum::NoExecutionContextError is raised sometimes when we block on Ferrum::Page#frame_by

Removed

  • Ferrum::Browser#proxy_server
  • Ferrum::Browser.new(proxy: { server: true }) :server option.

0.12

13 Sep 08:03
Compare
Choose a tag to compare

Added

  • Alias Ferrum::Frame#content= to Ferrum::Frame#set_content
  • Alias Ferrum::Node#propery to Ferrum::Node#[]
  • Implement Ferrum::Network#blacklist= and Ferrum::Network#whitelist=
  • Alias Ferrum::Network#blocklist= to Ferrum::Network#blacklist=
  • Alias Ferrum::Network#allowlist= to Ferrum::Network#whitelist=
  • Alias Ferrum::Page#go to Ferrum::Page#go_to
  • Ferrum::Browser#create_page accepts now new_context: true which can create a page in incognito context, and yields
    a block with this page, after which the page is closed.
  • Ferrum::Browser supports new option :proxy https://github.com/rubycdp/ferrum#proxy
  • Ferrum::Network::Response#params attr_reader added
  • Ferrum::Node
    • #selected checks selected options. Returns an array of Ferrum::Node that's selected.
    • #select selects options by passed attribute, default: :value.
    • #computed_style returns hash of computed styles
  • Ferrum::JavaScriptError#stack_trace attr_reader
  • Windows support
  • Show warning and accept dialog if no handler given
  • Ferrum::Cookies#set ability to set cookie using Ferrum::Cookies::Cookie object
  • Ferrum::Network#emulate_network_conditions activates emulation of network conditions
  • Ferrum::Network#offline_mode puts browser into offline mode
  • Ferrum::Page#tracing - instance of Ferrum::Page::Tracing for trace capabilities.
  • Ferrum::Page::Tracing#record(&block) start/stop tracing for steps provided in passed block

Changed

  • Use Concurrent::MVar as execution_id in Ferrum::Frame
  • Min Ruby version is 2.6 and 3.0 is supported
  • Ferrum::Page#bypass_csp accepts hash as argument enabled: true by default
  • Ferrum::Context#has_target? -> Ferrum::Context#target?
  • We now start looking for Chrome first instead of Chromium, the order for checking binaries has changed
  • Multiple methods are moved into Utils:
    • Ferrum.with_attempts -> Ferrum::Utils::Attempt.with_retry
    • Ferrum.started -> Ferrum::Utils::ElapsedTime.start
    • Ferrum.elapsed_time -> Ferrum::Utils::ElapsedTime.elapsed_time
    • Ferrum.monotonic_time -> Ferrum::Utils::ElapsedTime.monotonic_time
    • Ferrum.timeout? -> Ferrum::Utils::ElapsedTime.timeout?
    • Ferrum.windows? -> Ferrum::Utils::Platform.windows?
    • Ferrum.mac? -> Ferrum::Utils::Platform.mac?
    • Ferrum.mri? -> Ferrum::Utils::Platform.mri?

Fixed

  • Ferrum::Node#selected, Ferrum::Node#select to work in frame scope