Browse files

Add Chrome to test suite. First time, some tests failed, second time,…

… not, so there may be some timeout/performance issues folks encounter by starting five driver instances with four different browsers
  • Loading branch information...
semperos committed Jan 20, 2012
1 parent 41c21fd commit c763ee1df6f14b3325d151e8e0a868fc157a215d
Showing with 6 additions and 0 deletions.
  1. +6 −0 test/clj_webdriver/test/core.clj
@@ -24,8 +24,11 @@
(def firefox-driver-no-cache (to (new-driver {:browser :firefox}) test-base-url))
+(log/debug "WARNING: The Chrome driver requires a separate download. See the Selenium-WebDriver wiki for more information if Chrome fails to start.")
+(def chrome-driver (start {:browser :chrome} test-base-url))
(def opera-driver (start {:browser :opera} test-base-url))
+;; clojure.test fixtures
(defn start-server [f]
(loop [server (run-jetty #'web-app/routes {:port test-port, :join? false})]
(if (.isStarted server)
@@ -38,6 +41,7 @@
(to firefox-driver test-base-url)
(to firefox-driver-no-cache test-base-url)
+ (to chrome-driver test-base-url)
(to opera-driver test-base-url)
@@ -46,6 +50,7 @@
(quit firefox-driver)
(quit firefox-driver-no-cache)
+ (quit chrome-driver)
(quit opera-driver))
(defn seed-driver-cache-fixture
@@ -465,6 +470,7 @@
(deftest test-common-features-across-browsers
(doseq [driver [firefox-driver
+ chrome-driver
(run-common-tests driver)))

0 comments on commit c763ee1

Please sign in to comment.