Repository navigation
fix(node): treat Ferrum's ExecutionContextDestroyedError and ForeignObjectError as a stale node - #403
Merged
Merged
Conversation
…bjectError as a stale node Ferrum raises ExecutionContextDestroyedError for a command cut off by a navigation and ForeignObjectError for a node argument from another page or world, both were NodeNotFoundError before (rubycdp/ferrum#755). Node commands raise ObsoleteNode for them, Capybara finds the element again after either, and set doesn't fail when a navigation cuts off its refocus.
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 moved two Chrome errors out of
NodeNotFoundErrorin rubycdp/ferrum#755:ExecutionContextDestroyedError: a command cut off by a navigation ("Inspected target navigated or closed", "Execution context was destroyed.").ForeignObjectError: aNodeorRemoteObjectargument from a previous page or another isolated world ("Argument should belong to the same JavaScript world as target object").Cuprite relied on them being
NodeNotFoundErrorin three places, so now:invalid_element_errorslists both, so Capybara finds the element again after either, e.g. awithinelement that went stale while Cuprite searched in it.ObsoleteNodefor both, as they did forNodeNotFoundError.setdoesn't fail when a navigation, e.g. a form submitted by typing Enter, cuts off the refocus after typing.