- Full-page screenshots no longer resize the window, preventing focus steal on macOS [#580]
0.17.2 (March 23, 2026)
Ferrum::Network::Response#body!returns body or throws error if implicableFerrum::Browser#new(dockerize: true)whether to add CLI flags to run a browser in a container,falseby default- Initial support for RBS types [#565]
Ferrum::Network::Response#bodyreturns body or nil in case of errors- Disable Chrome code sign clones [#555]
- Ruby version required is >= 3.1 [#565]
- Proper handle wss urls, and fix session_id loss for undetermined order of CDP events [#559]
browser.resettries to dispose default implicit context [#566], [#540]
0.17.1 (May 11, 2025)
- Can't use single quotes in screenshot :selector [#465]
remote_debug_urlfor modern Chrome returns chrome-devtools-frontend.appspot.com absolute url
0.17 - (May 10, 2025)
Ferrum::Network::Exchange#blob?determines if the exchange is blob [#516]Ferrum::Network::Request#headersare enhanced and supplemented withNetwork.requestWillBeSentExtraInfo[#506]Ferrum::Page#offto unsubscribe from CDP events [#455]Ferrum::Mouse#scroll_byto be able to scroll by, as alternative toscroll_to[#514]Ferrum::Network::Exchange#unknowndetermines if the exchange is in an unknown state, meaning that browser might not return info about it [#426]Ferrum::Network::Exchange#loader_idreturns loader id [#426]Ferrum::Browser#debugopens headless session in the browser devtools frontend [#519]Ferrum::Frame#parentreturns the parent frame if this frame is nested [#523]Ferrum::Frame#frame_elementreturns the element in which the window is embedded [#524]Ferrum::Page#start_screencaststarts sending frames to record screencast [#494]Ferrum::Page#stop_screencaststops sending frames [#494]Ferrum::Browser#new(incognito: false)whether to create an incognito profile for the browser startup window,trueby default.
Ferrum::Network::Exchange#finished?takes into account that exchange might be in an unknown state after loader changed(nextgo_tocall) and considers such as finished [#426]headless: "new"mode is removed as it's now default in modern Chrome, just useheadless: trueinstead [#518]
- Correctly set mouse events buttons property [#509]
- Prevent 'Hash#[]=': can't add a new key into hash during iteration [#513]
Ferrum::Network::Exchange#finished?andFerrum::Network#wait_for_idletake into account that request can be a blob [#496]- Safe call body method (DOM) when page is empty and no html [#522]
0.16 - (Dec 1, 2024)
Ferrum::Network#wait_for_idle!raises an error if timeout reached.Ferrum::Browser#closecloses browser gracefully issuing a CDP command, doesn't clean up ruby resources.Ferrum::Node#removeremoves node from DOM tree.Ferrum::Node#exists?check whether the node in ruby world still exists in the DOM tree.Ferrum::Cookies#storestores all cookies of current page in a file.Ferrum::Cookies#loadLoads all cookies from the file and sets them for current page.Ferrum::Page#screenshotsupports webp image format.Ferrum::Page#activateactivates the target for the given page.
Ferrum::Network#wait_for_idlenow returns true or false. Doesn't raise an error [BREAKING CHANGE].
:ws_urloption is now used without modifications WYSIWYG.Network.requestWillBeSentcallback didn't handle params in a type-safe wayPage.frameStoppedLoadingcallback shouldn't wait for document_node_id responseJSON::NestingErroris raised when browser returns very deeply nested JSON and crashes the thread [#498]
0.15 - (Feb 17, 2024)
Ferrum::Page#disable_javascriptdisables the JavaScript from the HTML source [#407]Ferrum::Page#set_viewportemulates the viewport [#406]Ferrum::Downloads[#416]#filesinformation about downloaded files#waitwait for file download to be completed#set_behaviorwhere and whether to store file
Browser::Client#commandaccepts :async parameter [#433]Ferrum::Browserintroduce:flattenmode with one connection and sessions [#434]- Support for ping requests [#417]
Ferrum::Browserintroduce:ws_urloption to set external websocket for a browser [#435]
Ferrum::Page#screeshotaccepts :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::Targetinstead of passing browser and making cyclic dependency on the browser instance, we pass now a thin client [#431] - Bump
websocket-driverto~> 0.7[#432] - Got rid of
Concurrent::AsyncinFerrum::Browser::Subscriber[#432] Ferrum::Page#set_window_boundsis renamed toFerrum::Page#window_bounds=Ferrum::Pageget right client from the Target and passes it down everywhere [#433]Ferrum::Network::InterceptedRequestacceptsFerrum::Browser::Clientinstead ofFerrum::Page[#433]Ferrum::Browser::Client->Ferrum::Client[#433]
- Exceptions within
.on()were swallowed by a thread pool ofConcurrent::Async[#432] Ferrum::Context#add_targetputs 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 - (Sep 14, 2023)
Ferrum::Page#device_pixel_ratioreturns 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 argumentscopeasFerrum::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 supportseachmethodFerrum::Cookies::Cookie#priority#sameparty?#source_scheme#source_port#to_s#to_h
Ferrum::Network::Request#to_hFerrum::Network::Response#to_h
Ferrum::Network::Exchange#finished?returnstrueonly fully loaded responsesFerrum::Page#resizeset deviceScaleFactor as0by default [#330]Ferrum::Network#interceptsilently 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::StatusErrorfor any top frame navigation error [#341] Ferrum::Network::Response#loaded?for redirect response [#338]
0.13 - (Nov 12, 2022)
Ferrum::Browser::VersionInfoFerrum::Browser#versionrequests 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 = npage supports its own timeoutFerrum::Frame#execution_idreturns execution context id and doesn't raises errorFerrum::Frame#execution_id!returns execution context id and raises error when times out on borrowing
Ferrum::Keyboard#up, #downaccept only one key.
Ferrum::Page#gotofixed undefined method url for nil:NilClass when page times out and there are pending requests.Runtime.consoleAPICalleddidn't show log messagesFerrum::Page#subscribe_frame_detachedadded to clean up old framesFerrum::Proxywas hanging at the exit due to issue in WebrickFerrum::NoExecutionContextErroris raised sometimes when we block onFerrum::Page#frame_by
Ferrum::Browser#proxy_serverFerrum::Browser.new(proxy: { server: true }):server option.
0.12 - (Sep 13, 2022)
- Alias
Ferrum::Frame#content=toFerrum::Frame#set_content - Alias
Ferrum::Node#properytoFerrum::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#gotoFerrum::Page#go_to Ferrum::Browser#create_pageaccepts nownew_context: truewhich can create a page in incognito context, and yields a block with this page, after which the page is closed.Ferrum::Browsersupports new option:proxyhttps://github.com/rubycdp/ferrum#proxyFerrum::Network::Response#paramsattr_reader addedFerrum::Node#selectedchecks selected options. Returns an array ofFerrum::Nodethat's selected.#selectselects options by passed attribute, default::value.#computed_stylereturns hash of computed styles
Ferrum::JavaScriptError#stack_traceattr_reader- Windows support
- Show warning and accept dialog if no handler given
Ferrum::Cookies#setability to set cookie usingFerrum::Cookies::CookieobjectFerrum::Network#emulate_network_conditionsactivates emulation of network conditionsFerrum::Network#offline_modeputs browser into offline modeFerrum::Page#tracing- instance ofFerrum::Page::Tracingfor trace capabilities.Ferrum::Page::Tracing#record(&block)start/stop tracing for steps provided in passed block
- Use
Concurrent::MVarasexecution_idinFerrum::Frame - Min Ruby version is 2.6 and 3.0 is supported
Ferrum::Page#bypass_cspaccepts hash as argumentenabled: trueby 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_retryFerrum.started->Ferrum::Utils::ElapsedTime.startFerrum.elapsed_time->Ferrum::Utils::ElapsedTime.elapsed_timeFerrum.monotonic_time->Ferrum::Utils::ElapsedTime.monotonic_timeFerrum.timeout?->Ferrum::Utils::ElapsedTime.timeout?Ferrum.windows?->Ferrum::Utils::Platform.windows?Ferrum.mac?->Ferrum::Utils::Platform.mac?Ferrum.mri?->Ferrum::Utils::Platform.mri?
Ferrum::Node#selected,Ferrum::Node#selectto work in frame scope
0.11 - (Mar 11, 2021)
Ferrum::CoordinatesNotFoundErrorFerrum::Node#wait_for_stop_movingwait for any js or css movements to finish#moving?shows if node is moving#focusable?if node can have focus
Ferrum::Page#playback_rateshows the rate#playback_rate=control css animation speedpositionget window positionposition=set window position
Ferrum::Browser#evaluate_on_new_documentevaluate js on every new document--no-startup-windowflag to Chrome by default
Ferrum::NodeIsMovingError->Ferrum::NodeMovingErrorFerrum::Node::MOVING_WAIT->Ferrum::Node::MOVING_WAIT_DELAYFerrum::Node::MOVING_ATTEMPTS->Ferrum::Node::MOVING_WAIT_ATTEMPTSConcurrent::Hash->Concurrent::Mapin contexts
- Typo
Ferrum::Page::Screenshot::PAPEP_FORMATS->Ferrum::Page::Screenshot::PAPER_FORMATS
0.10.2 - (Feb 24, 2021)
- Set
Ferrum::Page@eventwhen setting up main frame
0.10.1 - (Feb 24, 2021)
- Don't mutate options in
Ferrum::Frame::Runtime#call
0.10 - (Feb 23, 2021)
- Added alias
go_toforgoto - Introduce
Ferrum::Browseroption:pending_connection_errors - You can pass background to screenshot method
browser.screenshot(background_color: Ferrum::RGBA.new(0, 0, 0, 0.0)) Ferrum::StatusError#pendingsattr_reader addedFerrum::ProcessTimeoutError#outputattr_reader addedFerrum::Page#mhtml
Ferrum::Browser::Process::PROCESS_TIMEOUTis 2 -> 10 by defaultFerrum::Browser::Network#authorizenow accepts blockFerrum::Page#pdfmethod now streams file withtransferMode: "ReturnAsStream"mode good for large files
execution_idin Runtime is called with retry- Main frame is set correct under some circumstances
Network.loadingFailedevent is added to catch canceled requestsdetectCyclefor cyclic JS objects- Fall back to JS when finding element position with
get_content_quads - Temporary user-data-dir is removed after
Ferrum::Browser::Process#stop
0.9 - (Jul 24, 2020)
Ferrum::NodeIsMovingErrorto raise error when node is moving before clickingFERRUM_NODE_MOVING_WAITandFERRUM_NODE_MOVING_ATTEMPTSenvs are added to wait until node stops moving with at leastnattemptsFerrum::Page#wait_for_reloadwaits until page is reloaded:ignore_default_browser_optionsoption is added toFerrum::Browserto exclude Ferrum's defaults- XVFB support
Ferrum::Runtime::CyclicObjectis returned when JS object cannot be represented in RubyFERRUM_LOGGING_SCREENSHOTSenv is added to skip showing Base64 screenshots in logger
Ferrum::Network::Request#respondcan accept content longer than 45 charsFerrum::Browser::Subscriberis thread safe
0.8 - (Apr 7, 2020)
Ferrum::Framesupports looking up nodes inside frame with methods:#at_css#css#at_xpath#xpath
Ferrum::Page#set_contentcan be used to set the content of the page:ws_max_receive_sizeoption is added toFerrum::BrowserFerrum::ProcessTimeoutErrorerror instead ofRuntimeErrorFerrum::Page#stopto stop loading page
- Fix Ruby 2.7 warnings
Ferrum::Node#clickacceptsoffset: { :x, :y, :position (:top | :center)and:delayoptions- Instantiate empty main frame in advance
Ferrum::Mouse#movesupports steps as option:steps- Delegate
current_titleto page Ferrum::Browser::Cookies#setsupports:httponlyand:samesiteoptions
Ferrum::Frame#execution_idshould be set only onceFerrum::Page#doctypecan be nil- Add
:slowmoableoption to all methods with visual representation Ferrum::Page#screenshotworks for html tag set with 100% width and height
.ruby-versionfile from repository
0.7 - (Jan 28, 2020)
- Fix issue when connection is refused and shows up as pending
- Can set
Accept-Languageeven ifUser-Agentis not provided
FERRUM_GOTO_WAITenv is added with default value of 0.1Ferrum::Network::Response#typeshows type of the responseFerrum::Network#wait_for_idlewait for network idleidle?shows if there are no connectionstotal_connectionsshows total number of connectionsfinished_connectionsshows a number of closed connectionspending_connectionsshows a number of opened connections
Ferrum::Network::Exchange#intercepted_requestattr accessor for intercepted request if any#blank?shows if request is absent#finished?returns true if request blocked or response is given#pending?shows if exchange is still waiting response
Ferrum::Network::InterceptedRequest#status?one ofresponded|continued|aborted
- Initial support for Firefox
- Dedicated queue for request interruptions
Ferrum::Browser- accepts
:extensionsoption with:sourcekey which can have js text to be executed when page is opened #bypass_cspcan now bypass csp headers when injecting scripts
- accepts
Ferrum::StatusError#pendingsnow shows all pending connections when time is outFerrum::Browser::Process#pathis delegated toCommand
- Stop listening to
Page.domContentEventFired,Page.frameScheduledNavigationandPage.frameClearedScheduledNavigationevents
0.6.2 - (Oct 30, 2019)
Ferrum::Target:#page=attribute writer#maybe_sleep_if_new_window- sleep withFerrum::Target::NEW_WINDOW_WAITseconds byFerrum::Target#window?condition
0.6.1 - (Oct 30, 2019)
Ferrum::Frame#execution_id?- boolean of equals passed argumentexecution_idand currentexecution_idfrom current class instance
Ferrum::Page::Frames- fix missing frame:#frame_by- optional argumentexecution_idremoved with change subscriber to search byFerrum::Frame#execution_id?
0.6.0 - (Oct 29, 2019)
- description of
browser.add_script_tag/browser.add_style_tagin README Ferrum::Target#attached?- boolean of the check the exists ofFerrum::Target#pageFerrum::Page::Screenshot::DEFAULT_PDF_OPTIONS- pdf settings constantFerrum::Page::Screenshot::PAPER_FORMATS- available formats constantFerrum::Page::Framesmodule implementation:#main_frame- attribute reader as new instance ofFerrum::Framecreated byRuntime.executionContextCreated.context.auxData.frameId#frames- results of delegated#valuesmethod into instance variableframes#frame_by- searching method by attributes: id, execution_id, name (optional)#frames_subscribe- apply listeners of 'Page/Network/Runtime' streams of the frame-related events
Ferrum::Browser#add_script_tag- delegation toFerrum::Page#add_script_tagFerrum::Browser#add_style_tag- delegation toFerrum::Page#add_style_tagFerrum::Network::AuthRequestclass implementation:- initializer accepts two arguments:
pageas first - instance ofFerrum::Pageparamsas second - params fromonsubscriber "Fetch.authRequired"#navigation_request?- delegation toisNavigationRequestof passed to instanceparams#auth_challenge?- strict equal ofsourceas argument with delegation toauthChallenge.sourceof passed to instanceparams#match?- boolean match ofregexpas argument with#url#continue- fires thecommandFetch.continueWithAuthonFerrum::Pageinstance with passedoptionsas argument#abort- fires thecommandFetch.failRequestonFerrum::Pageinstance with errorReason: "BlockedByClient" on currentrequestId#url- delegation torequest.urlof passed to instanceparams#method- delegation torequest.methodof passed to instanceparams#headers- delegation torequest.headersof passed to instanceparams#initial_priority- delegation torequest.initialPriorityof passed to instanceparams#referrer_policy- delegation torequest.referrerPolicyof passed to instanceparams#inspect- simple implementation of nativeinspectmethod with returns of the current internal state
Ferrum::Page::Screenshot#screenshot- handle:fulloptionFerrum::Page::FrameintoFerrum::Frame:- initializer accepts three arguments:
idas first - value ofPage.frameAttached.frameIdpageas second - instance ofFerrum::Pageparent_idas third - withnilas default valueFerrum::Page::Frame#name/Ferrum::Page::Frame#name=- class attribute accessorFerrum::Page::Frame#state=- attribute writer forstateinstance variable, can bestarted_loading | navigated | scheduled_navigation | cleared_scheduled_navigation | stopped_loadingFerrum::Page::Frame#main?- boolean of the check the not existed parent_id instance variableFerrum::Page::Frame#execution_context_idconverted intoFerrum::Frame#execution_idwith useexecution_idinstance variableFerrum::Page::Frame#frame_urlintoFerrum::Frame#url- 'document.location.href' referenceFerrum::Page::Frame#frame_titleintoFerrum::Frame#title- 'document.title' referenceFerrum::Page::Frame#inspect- simple implementation of nativeinspectmethod with returns of the current internal state
Ferrum::Page::DOMintoFerrum::Frame::DOM:Ferrum::Page::DOM#titlerenamed intoFerrum::Frame::DOM#current_titleFerrum::Frame::DOM#doctype- serialized 'document.doctype' referenceFerrum::Frame::DOM#css/Ferrum::Frame::DOM#at_css- added@pagereferences for command related methods
Ferrum::Page::RuntimeintoFerrum::Frame::Runtime:Ferrum::Frame::DOM#evaluate_on- added@pagereferences for command related methodsFerrum::Frame::SCRIPT_SRC_TAG- js implementation for: createElement <script>, fil insrcwith appendChild into document.headFerrum::Frame::SCRIPT_TEXT_TAG- js implementation for: createElement <script>, fil intextwith appendChild into document.headFerrum::Frame::STYLE_TAG- js implementation for: createElement <style> with appendChild into document.headFerrum::Frame::LINK_TAG- js implementation for: createElement , fil inhrefwith appendChild into document.headFerrum::Frame::Runtime#add_script_tag- firesevaluate_asyncwith passed args: url, path, content, type: "text/javascript"Ferrum::Frame::Runtime#add_style_tag- firesevaluate_asyncwith passed args: url, path, content
Ferrum::Network- switch from deprecatedNetwork.continueInterceptedRequesttoFetch.continueRequestFerrum::Network::Exchange:- first argument
pagefor initialize with fillpageinstance variable #build_response- fix arguments forNetwork::Response.new#inspect- simple implementation of nativeinspectmethod with returns of the current internal state
- first argument
Ferrum::Network::InterceptedRequest:#interception_idinto#request_idasrequestIdreference on passedparams#respond- thecustom request fulfilment supportimplementation by fires thecommandFetch.failRequestonFerrum::Pageinstance with passedoptionsas argument
Ferrum::Network::Response:- first argument
pagefor initialize with fillpageinstance variable #body- implementation of ability to get response body by fires thecommandNetwork.getResponseBodyonFerrum::Pageinstance with on specificrequestId#main?- boolean of equalspage.network.responseand current class instance#==- boolean of equals passed argument object.id and currentrequestIdfromparamsinstance variable#inspect- simple implementation of nativeinspectmethod with returns of the current internal state
- first argument
Ferrum::Node:- replaced first argument
pageintoframe/pageinstance variable initialized asframe.page #frame_id- delegation toframeIdof passed to instancedescription#frame- instance of frame frompageinstance found by#frame_id
- replaced first argument
Ferrum::Page::Event- add frames implementation:event/document_idattribute readers#subscribelisteners replaced with#frames_subscribefrom includedFerrum::Page::Framesinstance#resize- evaluate JS: document.documentElement.scrollWidth, document.documentElement.scrollHeight for fullscreen case
Ferrum::Page#frame_name#frame_url, with delegatedFerrum::Browser#frame_url#frame_title, with delegatedFerrum::Browser#frame_title#within_frame, with delegatedFerrum::Browser#within_frame
Ferrum::Page::Event:- include DOM, Runtime, Frame
waiting_framesinstance variableframe_stackinstance variable
0.5.0 - (Sep 27, 2019)
- description of
Thread safetyapproach section in README Ferrum::NoSuchTargetErrorFerrum::Network::Request#url_fragment- delegation tourlFragmentof instancerequest- The removing of temporary directory on
Ferrum::Browser::Process#stop:Ferrum::Browser::Process.directory_removerproc for remove entry with the passed path to the temporary directory as an argument Ferrum::Page#viewport_size- evaluates JS:innerWidthandinnerHeightvalues onwindowobjectFerrum::Page#document_size- evaluates JS:offsetWidthandoffsetHeightvalues ondocument.documentElementobjectFerrum::Browser#viewport_size- delegation toFerrum::Page#viewport_sizeFerrum::Contextclass implementation:- initializer accepts three arguments:
browseras first - instance ofFerrum::Browsercontextsas second - instance ofFerrum::Contextsidas third - the value of browser command:Target.createBrowserContext.browserContextId- includes
idattribute reader - the passed argument:id - includes
targetsattribute reader - the thread safe instance of hash - includes
pendingsattribute reader - the thread safe instance of mutable variable - includes
POSITIONconstant - the freeze array offirstlastsymbols #default_target- memoization of#create_targetresult#create_target- assignstarget.idas fetch oftargetIdfromTarget.createTargetwith assigntargetfromtargetInfo#page- delegation todefault_targetofFerrum::Context#pages- delegations topage's taken fromFerrum::Context#targetsasvalues#windows- delegations topage's taken fromFerrum::Context#targetsasvalueswithwindow?truthy condition takespositionas first argument and optional second argumentsizewith1as default value may raiseArgumentErroron the passedpositionwhich not included intoFerrum::Context::POSITIONconstant values#create_page- delegation totargetwith thetargetrecreation byFerrum::Context#create_target#add_target- creates new instance ofFerrum::Targetwith fill byFerrum::Target.window?condition of:targetsinstance variable onidorpendingsinstance variable as replace of@value#update_target- updates specifictargetintargetsinstance variable bytarget_idandparamswhich are passed as arguments#delete_target- deletes fromtargetsinstance variable by passedtarget_idas argument#dispose- disposes fromcontextsinstance variable by passedidas attribute reader#inspect- simple implementation of nativeinspectmethod with returns of the current internal state
Ferrum::Targetclass implementation:- initializer accepts two arguments:
browseras first - instance ofFerrum::Browserparamsas second (optional) - instance ofFerrum::Contexts#update- attribute writer forparamsinstance variable by passedparamsas one argument#page- new instance ofFerrum::Pagecreated for specifictargetId#window?- boolean of the check the exists ofFerrum::Target#opener_id#id- delegation totargetIdof passed to instanceparams#type- delegation totypeof passed to instanceparams#title- delegation totitleof passed to instanceparams#url- delegation tourlof passed to instanceparams#opener_id- delegation toopenerIdof passed to instanceparams#context_id- delegation tobrowserContextIdof passed to instanceparams
Ferrum::Contextsclass implementation: (subscriber onTarget.targetCreated)- initializer accepts
browseras the one argument - includes
contextsattribute reader - the thread safe instance of hash #default_context- memoization of#createresult#find_by- finding the last match incontextsinstance variable by match of passedtarget_idintotargets.keysrequiredtarget_id: valueargument returnsnilon the not-matched case#create- assigns new instance ofFerrum::Contextwith fetchedbrowserContextIdfromTarget.createBrowserContextintocontextsinstance variable returns the created instance ofFerrum::Context#dispose- removes specificcontextfromcontextsinstance variable by passedcontext_idwith firesTarget.disposeBrowserContextbrowser command returnstrueboolean on the success dispose#reset- nullify thedefault_contextinstance variable and fires thedisposemethod on eachcontextincontextsinstance variable
- initializer accepts
Ferrum::Browser#contexts- reader ofFerrum::Contextsinstance:Ferrum::Browser#default_context- delegation toFerrum::Browser#contexts- the delegation to
Ferrum::Browser#default_context:Ferrum::Browser#create_targetFerrum::Browser#create_pageFerrum::Browser#pagesFerrum::Browser#windows
Ferrum::NoSuchWindowErrorintoNoSuchPageErrorFerrum::Page::NEW_WINDOW_WAITmoved as unchanged toFerrum::TargetFerrum::Browser#page- the delegation fromFerrum::Browser#targetstoFerrum::Browser#default_contextFerrum::Browser#page- from the instance ofFerrum::Browser#targetsinto delegation toFerrum::Browser#default_context
Ferrum::EmptyTargetsErrorthe hack to handlenew windowwhich doesn't have events at all byFerrum::Page#session_idwithTarget.attachToTargetandTarget.detachFromTargetusageFerrum::Page#close_connection- the logic is moved toFerrum::Page#closedirectly- the third argument (
new_window = false) forFerrum::Pageinitializer Ferrum::Targetsclass with the delegations toFerrum::Targetsinstance inFerrum::Browserinstance:Ferrum::Browser#window_handleFerrum::Browser#window_handlesFerrum::Browser#switch_to_windowFerrum::Browser#open_new_windowFerrum::Browser#close_windowFerrum::Browser#within_window
0.4.0 - (Sep 17, 2019)
Ferrum::Networkmodule - moved logic fromFerrum::Page::Netwith addition changesFerrum::Browser#network- instance ofFerrum::Networkfrom delegatedFerrum::PageinstanceFerrum::Network#request&Ferrum::Network#response- delegation toNetwork::ExchangeinstanceFerrum::Network#first_by/Ferrum::Network#last_by- implemented searching by passed request_id inNetwork::ExchangeinstanceFerrum::Browser#trafficdelegation toFerrum::NetworkofNetwork::ExchangeinstancesFerrum::Network::Exchange- simple request/response constructor with monitoring#build_request- instance ofNetwork::Requestwith passed params#build_response- instance ofNetwork::Responsewith passed params#build_error- instance ofNetwork::Errorwith passed params#navigation_request?- the request verification on document by passed frame_id#blocked?- boolean which becomes true when no the constructed response#to_a- returns array of constructed request/response/error instances
Ferrum::Network::Request#type- delegation totypeof passed to instance paramsFerrum::Network::Request#type?- boolean compare withtypeof instance with passed type as argumentFerrum::Network::Request#frame_id- delegation toframeIdof passed to instance paramsFerrum::Network::InterceptedRequest#abort- firescontinuemethod of instance witherrorReasonasAbortedFerrum::Network::InterceptedRequest#inspect- simple implementation of nativeinspectmethod with returns of the current internal stateFerrum::Page::Frame#frame_id- reader to public available offrameIdbyFerrum::Page#frame_id
- description of
Network/Authorization/Interceptionsections in README Ferrum::Browser#screenshot&Ferrum::Browser#pdfmethods are returns bin when no path is givenFerrum::Browser#statusdelegated toFerrum::NetworkFerrum::Browser#authorizedelegated toFerrum::NetworkFerrum::Networkmodule intoclassapproach forInterceptedRequest/Request/Response/ErrorclassesFerrum::Browser#intercept_requestintoFerrum::Network#interceptFerrum::Browser#subscribeintoFerrum::Network#subscribewith public availableFerrum::Browser#authorized_responseintoFerrum::Network#authorized_responsewith public availableFerrum::Browser#clear_memory_cache&Ferrum::Browser#clear_network_trafficmerged toFerrum::Network#clearwith addition oftrafficclear by the argument as symbol type oftraffic/cacheFerrum::Network::Request#time- usewallTimeparams fir time detectionbody_sizeattribute writer ofFerrum::Network::Responsewith reduce of size on headers_size to handleencodedDataLengthwhenNetwork.responseReceivedis not dispatched
Ferrum::Network::Response#redirect_urlFerrum::Page::NetFerrum::Browser#abort_requestFerrum::Browser#continue_requestFerrum::Browser#response_headersFerrum::Browser#network_trafficFerrum::Network::InterceptedRequest#is_navigation_request=(attribute writer)
0.3.0 - (Sep 12, 2019)
- CI build by TravisCI for ruby versions:
2.3/2.4/2.5/2.6/jruby-9.2.8.0 - fix specs with support of MacOS time formats
Ferrum::Mouse::CLICK_WAITasFERRUM_CLICK_WAITENV-varwith0.1as default valueFerrum::Browser#authorizeoption:typewith valid values:server(by default),:proxy- Logo 🎉
Ferrum::Node#inner_text- evaluates JS:this.innerTexton Node instanceFerrum::Page::Runtime::INTERMITTENT_ATTEMPTSasFERRUM_INTERMITTENT_ATTEMPTSENV-varwith6as default valueFerrum::Page::Runtime::INTERMITTENT_SLEEPasFERRUM_INTERMITTENT_SLEEPENV-varwith0.1as default valueFerrum::Page#ongetting thenameas option with:dialog/:request_interceptedcases &blockas last argumentFerrum::Browser#on- delegated actions toFerrum::PageinstanceFerrum::Dialogobject to handle JavaScript Dialog's- required
page, paramsas init arguments #acceptfires JS:Page.handleJavaScriptDialogas command on providedFerrum::Pageinstance with options which includedaccept: true#dismissfires JS:Page.handleJavaScriptDialogas command on providedFerrum::Pageinstance withaccept: false#match?compare message by passed regexp- description of
Dialogfeature in README
- required
Ferrum::Page::Eventextend ofConcurrent::Eventwith implementation ofreset/waitfix- implement
Ferrum::Page::Event#iterationto reusesynchronizeblock on@iterationvalue ofConcurrent::Event - redefinition of
Concurrent::Event#reset- increase@iterationoutside ofif @setblock
- implement
FERRUM_PROCESS_TIMEOUTENV-varasFerrum::Browser::Process::PROCESS_TIMEOUTwith2as default value- Elapsed time implementation:
Ferrum::Browser::Process::WAIT_KILLEDwith0.05Ferrum.monotonic_time- delegation toConcurrentobjectFerrum.started- class variable@@startedasmonotonic_timeFerrum.elapsed_time- a difference ofmonotonic_timeas minuend and passed time as argument or@@startedas subtrahendFerrum.timeout?- boolean compare passed values(start, timeout)byelapsed_time
- JRuby support by replaces of
::Process::CLOCK_MONOTONICusages according toElapsed-timeimplementation
- fix globally changing of Thread behaviour on options
abort_on_exception/report_on_exception Ferrum::Page::Input#find_positionintoFerrum::Node#find_positionFerrum::Browser#scroll_tointoFerrum::Mouse#scroll_to- option
:timeoutinto:waitforFerrum::Page#command/Ferrum::Mouse#click - description of
Authorizationoptions in README Ferrum::Page::Net#intercept_requestblock as last argument intoFerrum::Page::Net#on(:request_intercepted)with passed blockFerrum::Browser::TIMEOUTintoFerrum::Browser::DEFAULT_TIMEOUTasFERRUM_DEFAULT_TIMEOUTENV-varwith5as default value- usage of
Concurrent::EventintoFerrum::Page::Eventas@eventofFerrum::Pageinstance Ferrum::Page::NEW_WINDOW_BUG_SLEEPintoFerrum::Page::NEW_WINDOW_WAITasFERRUM_NEW_WINDOW_WAITENV-varwith0.3as default value
Ferrum::Page::InputFerrum::Browser#proxy_authorize/Ferrum::Page::Net#proxy_authorizeFerrum::ModalNotFoundErrorFerrum::Page#reset_modalswith delegation toFerrum::BrowserFerrum::Page#find_modalwith delegation toFerrum::BrowserFerrum::Page#accept_promptwith delegation toFerrum::BrowserFerrum::Page#dismiss_confirmwith delegation toFerrum::BrowserFerrum::Page#accept_confirmwith delegation toFerrum::BrowserFerrum::Browser#on_request_intercepted
0.2.1 - (Sep 5, 2019)
- handle
EOFError/Errno::ECONNRESET/Errno::EPIPEerrors with rescue - description options of
Customizationin README
- increased
Browser::Process::PROCESS_TIMEOUTconstant by 1 Ferrum::Network::InterceptedRequest#match?to handle cases forRuby 2.3and less
0.2.0 - (Sep 3, 2019)
- snippet examples of the actions in README
Ferrum::Node#focus- fires thecommandDOM.focusonFerrum::PageinstanceFerrum::Node#blur- evaluates JS:this.blur()onFerrum::PageinstanceFerrum::Node#click- fires the nativeclickonFerrum::Pageinstance- usage of
FERRUM_INTERMITTENT_ATTEMPTSENV-varon the rescue of runtime intermittent error - implementation's of
Ferrum::Page::DOM#xpath&Ferrum::Page::DOM#at_xpath Ferrum.with_attempts- retry attempt with the sleep on the block passed as an argumentFerrum::NoExecutionContextError- raises when there's nocontextavailableFerrum::Node#attribute- evaluates JS:this.getAttributewith passednameFerrum::Mouse- dedicated class ofmouseactions:click/down/up/moveFerrum::Browser#mouse- delegated actions toFerrum::Mouseinstance extracted fromFerrum::Page::InputFerrum::Page::Input#find_position- usage ofDOM.getContentQuadsto find position of node bytop/leftFerrum::Keyboard- dedicated class ofkeyboardactions:down/up/type/modifiersFerrum::Browser#keyboard- delegated actions toFerrum::Keyboardinstance extracted fromFerrum::Page::InputFerrum::Headersdedicated class of headers manager withget/set/clear/addactions which delegated toFerrum::PageinstanceFerrum::Cookiesdedicated class which includes logic fromFerrum::Browser::API::Cookie&Ferrum::Cookiewith actions:all/[]/set/remove/clearFerrum::Page#cookies- delegated actions toFerrum::CookiesinstanceFerrum::Page::Screenshotmodule with methodsscreenshot/pdfimplemented by commandsPage.captureScreenshot/Page.printToPDFFerrum::Browser#screenshot- delegated actions toPage::ScreenshotmoduleFerrum::Network::InterceptedRequestauth_challenge?match?abortcontinueurlmethodheadersinitial_priorityreferrer_policy
Ferrum::Browser#intercept_request- method with delegated toFerrum::Page::Netwhich sets pattern intoNetwork.setRequestInterceptionFerrum::Browser#on_request_intercepted- method with delegated toFerrum::Page::Netwhich applies passed blockFerrum::Browser#abort_request- method with delegated toFerrum::Page::Netwhich stops request by passed interception_id
Ferrum::Page::Input#send_keysintoFerrum::Page::Input#typeFerrum::DeadBrowserintoFerrum::DeadBrowserErrorFerrum::ModalNotFoundintoFerrum::ModalNotFoundErrorFerrum::StatusFailErrorintoFerrum::StatusErrorFerrum::NodeErrorintoFerrum::NodeNotFoundErrorFerrum::Page#go_backintoFerrum::Page#backFerrum::Page#go_forwardintoFerrum::Page#forwardFerrum::Page::Dom#propertyintoFerrum::Page#propertyFerrum::Page::Dom#select_fileintoFerrum::Page#select_fileFerrum::Node::#clickgetting themodeargument as option withright/double/leftcasesFerrum::Page::Frame#switch_to_frameintoFerrum::Page::Frame#within_framewith added case ofArgumentError
Ferrum::ObsoleteNodeerrorFerrum::FrameNotFounderrorFerrum::Page::Input#set#set#select#type#generate_modifiers
Ferrum::Node#attributes#[]#select_option#unselect_option#visible?#checked?#selected?#disabled?#path#right_click#double_click
Ferrum::Browser::API-Header, Cookie, Screenshot, InterceptFerrum::Browser#set_overrides#url_whitelist#url_blacklist
0.1.2 - (Aug 27, 2019)
- catch of the intermittent errors inside of
evaluate'smethods Ferrum::Page::Runtime#evaluate_on- firesRuntime.callFunctionOncommand withfunctionDeclarationonFerrum::Page
Ferrum::Page::Runtime#evaluate_in
0.1.1 - (Aug 26, 2019)
- stringify the
urlwhich passed toFerrum::Page#goto
0.1.0 - (Aug 26, 2019)
- fires the
Ferrum::NodeErroron zero ofnode_id
- basic description in README
0.1.0.alpha - (Aug 2, 2019)
- Initial implementation
FerrumFerrum::Network- simple requests/responses data storeFerrum::Browser- basic command interfaceFerrum::Cookie- simple store of the cookie attributesFerrum::Node- abstract level of DOM-node with basic methodsFerrum::Page- basic object of the command references, which includedDOM, network and browser logicFerrum::Targets- initialize of thewindowmanager with a clean browser state- classes of errors with a description of specific reason