Added error handling to try/catch block.

This commit is contained in:
Jack Walker
2020-04-30 11:02:22 +10:00
parent 5555d32367
commit 8e1edf5cea
3 changed files with 3 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ RSpec.describe 'AutoRunEngine Test', :run_on_browserstack => true do
print_info 'Hooking a new victim, waiting a few seconds...'
wait = Selenium::WebDriver::Wait.new(:timeout => 30) # seconds
sleep 1 until @driver.navigate.to "#{VICTIM_URL}"
@driver.navigate.to "#{VICTIM_URL}"
# Give time for browser hook to occur
sleep 1 until wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}

View File

@@ -89,7 +89,7 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do
print_info 'Hooking a new victim, waiting a few seconds...'
wait = Selenium::WebDriver::Wait.new(:timeout => 30) # seconds
sleep 1 until @driver.navigate.to "#{VICTIM_URL}"
@driver.navigate.to "#{VICTIM_URL}"
# Give time for browser hook to occur
sleep 1 until wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}

View File

@@ -88,7 +88,7 @@ RSpec.describe 'BeEF Debug Command Modules:', :run_on_browserstack => true do
print_info 'Hooking a new victim, waiting a few seconds...'
wait = Selenium::WebDriver::Wait.new(:timeout => 30) # seconds
sleep 1 until @driver.navigate.to "#{VICTIM_URL}"
@driver.navigate.to "#{VICTIM_URL}"
# Give time for browser hook to occur
sleep 1 until wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}