Repository navigation
ref(page): handle :pending_connection_errors in Cuprite instead of passing it to Ferrum - #355
Merged
Merged
Conversation
…ssing it to Ferrum Ferrum deprecates the browser option and PendingConnectionsError, so Cuprite keeps the option out of Ferrum's options and raises its own PendingConnectionsError when go_to returns nil on a timeout. It inherits from Ferrum's while that exists, so rescuing it keeps working with a warning, and from Ferrum::StatusError once it's removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ferrum deprecates the
:pending_connection_errorsbrowser option andPendingConnectionsErrorin rubycdp/ferrum#689. Cuprite now owns the option, the same way it does:js_errorssince #354.:pending_connection_errors(stilltrueby default) out of Ferrum's options. With the option unset, Ferrum'sgo_toreturnsnilon a timeout in every version, so Cuprite raises its own error when that happens.visitraisesCapybara::Cuprite::PendingConnectionsError, with the same message andpendingsas before. While Ferrum still hasFerrum::PendingConnectionsError, Cuprite's class inherits from it, so existingrescue Ferrum::PendingConnectionsErrorkeeps working and prints a deprecation warning pointing at the rescue. Once Ferrum removes the class, Cuprite's inherits fromFerrum::StatusError.Works with the released Ferrum 0.20.1 and with Ferrum
main, so it doesn't need to wait for a Ferrum release or pin Ferrum.