Added more handling to allow browser room to be hooked comfortably

This commit is contained in:
Jack Walker
2020-04-29 15:17:23 +10:00
parent dd2fad3d14
commit 4a7f338527
3 changed files with 3 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ RSpec.describe 'AutoRunEngine Test', :run_on_browserstack => true do
# Give time for browser hook to occur
wait = Selenium::WebDriver::Wait.new(:timeout => 30) # seconds
sleep 2 until wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
sleep 15 until wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
@hooks = JSON.parse(RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}")
if @hooks['hooked-browsers']['online'].empty?

View File

@@ -91,7 +91,7 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do
# Give time for browser hook to occur
wait = Selenium::WebDriver::Wait.new(:timeout => 30) # seconds
sleep 2 until wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
sleep 15 until wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
@hooks = JSON.parse(RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}")
if @hooks['hooked-browsers']['online'].empty?

View File

@@ -93,7 +93,7 @@ RSpec.describe 'BeEF Debug Command Modules:', :run_on_browserstack => true do
# Give time for browser hook to occur
wait = Selenium::WebDriver::Wait.new(:timeout => 30) # seconds
sleep 2 until wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
sleep 15 until wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
@hooks = JSON.parse(RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}")
if @hooks['hooked-browsers']['online'].empty?