From 5be3015ef43f8e81019e7c0d7bec65b840a5a5cc Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Wed, 30 Oct 2024 00:42:34 +0000 Subject: [PATCH] [ci][rb] Fix remote tests (#14679) Signed-off-by: Viet Nguyen Duc --- .../selenium/webdriver/remote/driver_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rb/spec/integration/selenium/webdriver/remote/driver_spec.rb b/rb/spec/integration/selenium/webdriver/remote/driver_spec.rb index 36038859cd303..671aa1720fef3 100644 --- a/rb/spec/integration/selenium/webdriver/remote/driver_spec.rb +++ b/rb/spec/integration/selenium/webdriver/remote/driver_spec.rb @@ -83,10 +83,12 @@ module Remote it 'errors when not set', {except: {browser: :firefox, reason: 'grid always sets true and firefox returns it'}, exclude: {browser: :safari, reason: 'grid hangs'}} do - expect { - driver.downloadable_files - }.to raise_exception(Error::WebDriverError, - 'You must enable downloads in order to work with downloadable files.') + reset_driver!(enable_downloads: false) do |driver| + expect { + driver.downloadable_files + }.to raise_exception(Error::WebDriverError, + 'You must enable downloads in order to work with downloadable files.') + end end private