class Capybara::Cuprite::Browser::Page
def command(*args)
def command(*args) id = nil @mutex.synchronize do id = @client.command(*args) stop_at = Time.now.to_f + @wait while @wait > 0 && (remain = stop_at - Time.now.to_f) > 0 @resource.wait(@mutex, remain) end @wait = 0 end response = @client.wait(id: id) end