Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- `:pending_connection_errors` is handled by Cuprite instead of being passed to Ferrum, which deprecates it. `visit`
raises `Capybara::Cuprite::PendingConnectionsError`, a subclass of Ferrum's, and rescuing Ferrum's warns
[rubycdp/ferrum#689]
- A closed window is removed from Ferrum's context, which returns a copy of its targets, so `close_window` no longer
leaves it listed until Chrome reports it destroyed [rubycdp/ferrum#707]

### Fixed
- A click on a node the page removes before the hit test raises `ObsoleteNode`, which Capybara retries, instead of
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source "https://rubygems.org"

gem "byebug", "~> 11.1", platforms: %i[mri windows]
gem "ferrum", github: "rubycdp/ferrum", branch: "main"
gem "launchy", "~> 2.5"
gem "logger"
gem "ostruct"
Expand Down
2 changes: 1 addition & 1 deletion lib/capybara/cuprite/browser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def close_window(target_id)
@page_closed = true
end
target.page.close
targets.delete(target_id) # page.close is async, delete target asap
default_context.delete_target(target_id) # page.close is async, delete target asap
end

private
Expand Down
Loading