Fixed BrowserStack timeout error handling.

This commit is contained in:
Jack Walker
2020-05-15 11:26:30 +10:00
parent 0c429a8d43
commit 45f6595bda
4 changed files with 4 additions and 4 deletions

View File

@@ -124,7 +124,7 @@ RSpec.describe 'BeEF Debug Command Modules:', :run_on_browserstack => true do
begin
@driver.quit
rescue => exception
if exception.include?('Failed to open TCP connection')
if exception.class == NoMethodError && exception.message.include?('Failed to open TCP connection')
print_info "Encountered possible false negative timeout error checking exception."
expect(exception).to include('hub-cloud.browserstack.com:80')
else