diff --git a/test/common/beef_test.rb b/test/common/beef_test.rb index 79257493b..3953ea26d 100644 --- a/test/common/beef_test.rb +++ b/test/common/beef_test.rb @@ -30,4 +30,14 @@ class BeefTest session end + def self.new_attacker + self.login + end + + def self.new_victim + victim = Capybara::Session.new(:selenium) + victim.visit(VICTIM_URL) + victim + end + end \ No newline at end of file diff --git a/test/integration/tc_login.rb b/test/integration/tc_login.rb index 273413ab4..47b392e4d 100644 --- a/test/integration/tc_login.rb +++ b/test/integration/tc_login.rb @@ -53,9 +53,9 @@ class TC_login < Test::Unit::TestCase end def test_hooking_browser - attacker = BeefTest.login - victim = Capybara::Session.new(:selenium) - victim.visit(VICTIM_URL) + attacker = BeefTest.new_attacker + victim = BeefTest.new_victim + sleep 2.0 attacker.has_content?(VICTIM_DOMAIN)