Testing new client side wait to increase hook consistency in test.

This commit is contained in:
Jack Walker
2020-04-29 11:14:28 +10:00
parent 4726647d2f
commit 822bd61426
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
wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length").greater_than 0}
wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
puts @driver.execute_script("return window.beef.session.get_hook_session_id()")
@hooks = JSON.parse(RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}")

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
wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length").greater_than 0}
wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
puts @driver.execute_script("return window.beef.session.get_hook_session_id()")
@hooks = JSON.parse(RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}")

View File

@@ -90,7 +90,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").greater_than 0}
wait.until { @driver.execute_script("return window.beef.session.get_hook_session_id().length") > 0}
puts @driver.execute_script("return window.beef.session.get_hook_session_id()")
@hooks = JSON.parse(RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}")