Releases: rubycdp/ferrum
Releases Β· rubycdp/ferrum
0.16
Added
Ferrum::Network#wait_for_idle!
raises an error if timeout reached.Ferrum::Browser#close
closes browser gracefully issuing a CDP command, doesn't clean up ruby resources.Ferrum::Node#remove
removes node from DOM tree.Ferrum::Node#exists?
check whether the node in ruby world still exists in the DOM tree.Ferrum::Cookies#store
stores all cookies of current page in a file.Ferrum::Cookies#load
Loads all cookies from the file and sets them for current page.Ferrum::Page#screenshot
supports webp image format.Ferrum::Page#activate
activates the target for the given page.
Changed
Ferrum::Network#wait_for_idle
now returns true or false. Doesn't raise an error [BREAKING CHANGE].
Fixed
:ws_url
option is now used without modifications WYSIWYG.Network.requestWillBeSent
callback didn't handle params in a type-safe wayPage.frameStoppedLoading
callback shouldn't wait for document_node_id responseJSON::NestingError
is raised when browser returns very deeply nested JSON and crashes the thread [#498]
0.15
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
inFerrum::Browser::Subscriber
[#432] Ferrum::Page#set_window_bounds
is renamed toFerrum::Page#window_bounds=
Ferrum::Page
get right client from the Target and passes it down everywhere [#433]Ferrum::Network::InterceptedRequest
acceptsFerrum::Browser::Client
instead ofFerrum::Page
[#433]Ferrum::Browser::Client
->Ferrum::Client
[#433]
Fixed
0.14
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 requestFerrum::Network::Exchange#redirect?
determines if the exchange is a redirectFerrum::Network::Exchange#xhr?
determines if the exchange is XHRFerrum::Network::Request#xhr?
determines if the request is XHRFerrum::Network::Response#loaded?
returns true if the response is fully loadedFerrum::Network::Response#redirect?
returns true if the response is a redirectFerrum::Node#in_viewport?
checks if the element in viewport (optional argumentscope
asFerrum::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 supportseach
methodFerrum::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?
returnstrue
only fully loaded responsesFerrum::Page#resize
set deviceScaleFactor as0
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
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 timeoutFerrum::Frame#execution_id
returns execution context id and doesn't raise errorFerrum::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 messagesFerrum::Page#subscribe_frame_detached
added to clean up old framesFerrum::Proxy
was hanging at the exit due to issue in WebrickFerrum::NoExecutionContextError
is raised sometimes when we block onFerrum::Page#frame_by
Removed
Ferrum::Browser#proxy_server
Ferrum::Browser.new(proxy: { server: true })
:server option.
0.12
Added
- Alias
Ferrum::Frame#content=
toFerrum::Frame#set_content
- Alias
Ferrum::Node#propery
toFerrum::Node#[]
- Implement
Ferrum::Network#blacklist=
andFerrum::Network#whitelist=
- Alias
Ferrum::Network#blocklist=
toFerrum::Network#blacklist=
- Alias
Ferrum::Network#allowlist=
toFerrum::Network#whitelist=
- Alias
Ferrum::Page#go
toFerrum::Page#go_to
Ferrum::Browser#create_page
accepts nownew_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#proxyFerrum::Network::Response#params
attr_reader addedFerrum::Node
#selected
checks selected options. Returns an array ofFerrum::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 usingFerrum::Cookies::Cookie
objectFerrum::Network#emulate_network_conditions
activates emulation of network conditionsFerrum::Network#offline_mode
puts browser into offline modeFerrum::Page#tracing
- instance ofFerrum::Page::Tracing
for trace capabilities.Ferrum::Page::Tracing#record(&block)
start/stop tracing for steps provided in passed block
Changed
- Use
Concurrent::MVar
asexecution_id
inFerrum::Frame
- Min Ruby version is 2.6 and 3.0 is supported
Ferrum::Page#bypass_csp
accepts hash as argumentenabled: true
by defaultFerrum::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