Permalink
Browse files

Fix firefox-specific tests so they don't leave open browser instances…

… at the end
  • Loading branch information...
1 parent 4a86f36 commit 1de449116eea5864e937e46cab9db35a6107c40b @semperos semperos committed Jan 4, 2012
Showing with 12 additions and 7 deletions.
  1. +12 −7 test/clj_webdriver/test/core.clj
@@ -666,22 +666,27 @@
;; Firefox-specific Functionality
+(def tmp-firefox-driver (atom nil))
(deftest firefox-should-support-custom-profiles
(is (if (travis?)
true
(do
(log/info "[x] Starting Firefox with custom profile.")
- (driver? (to (new-driver {:browser :firefox
- :profile (ff/new-profile)})
- test-base-url))))))
+ (reset! tmp-firefox-driver (to (new-driver {:browser :firefox
+ :profile (ff/new-profile)})
+ test-base-url))
+ (driver? @tmp-firefox-driver))))
+ (quit @tmp-firefox-driver))
(deftest firefox-should-support-extensions
(is (if (travis?)
true
(do
(log/info "[x] Starting Firefox with extensions.")
- (driver? (to (new-driver {:browser :firefox
- :profile (doto (ff/new-profile)
- (ff/enable-extension :firebug))})
- test-base-url))))))
+ (reset! tmp-firefox-driver (to (new-driver {:browser :firefox
+ :profile (doto (ff/new-profile)
+ (ff/enable-extension :firebug))})
+ test-base-url))
+ (driver? @tmp-firefox-driver))))
+ (quit @tmp-firefox-driver))

0 comments on commit 1de4491

Please sign in to comment.