class Capybara::Window

def closed?

Returns:
  • (Boolean) - whether the window is closed
def closed?
  !exists?
end