Added more handling to allow browser room to hook comfortably
This commit is contained in:
@@ -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
|
||||
wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
|
||||
sleep 2 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?
|
||||
|
||||
@@ -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
|
||||
wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
|
||||
sleep 2 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?
|
||||
|
||||
@@ -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
|
||||
wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
|
||||
sleep 2 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?
|
||||
|
||||
Reference in New Issue
Block a user