Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Adds webdriver support for system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
justin taft committed Sep 26, 2015
1 parent dec215a commit 4c9cc28
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
:pretty-print true}}]}
:plugins [[lein-cljsbuild "1.0.1"]]
:source-paths ["src/"]
:profiles {:dev {:resource-paths ["test-deps"]
:dependencies [[clj-webdriver "0.6.1"]] }}


)
4 changes: 4 additions & 0 deletions script/dev-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
wget http://chromedriver.storage.googleapis.com/2.19/chromedriver_mac32.zip -O /tmp/chromedriver_mac32.zip
unzip /tmp/chromedriver_mac32.zip -d /tmp

52 changes: 52 additions & 0 deletions system-tests.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
(import '(org.openqa.selenium.remote DesiredCapabilities))
(import '(org.openqa.selenium.remote RemoteWebDriver))
(import '(org.openqa.selenium.chrome ChromeOptions))

(import '(java.net URL))



(def chromeOptions {

"binary" "/tmp/LightTableElectron/LightTable/builds/lighttable-0.8.0-mac/LightTable.app/Contents/MacOS/Electron"

"debuggerAddress" "127.0.0.1:8315"

;"excludeSwitches" [
;"disable-background-networking"
;"disable-client-side-phishing-detection"
;"disable-component-update"
;"disable-default-apps"
;"disable-hang-monitor"
;"disable-popup-blocking"
;"disable-prompt-on-repost"
;"disable-sync"
;"disable-web-resources"
;"enable-logging"
;"ignore-certificate-errors"
;"log-level"
;"metrics-recording-only"
;"no-first-run"
;"password-store"
;"remote-debugging-port"
;"safe-browsing-disable-auto-update"
;"safe-browsing-disable-download-protection"
;"test-type"
;"use-mock-keychain"
;]
})


(def capabilities (DesiredCapabilities/chrome))
(.setCapability capabilities ChromeOptions/CAPABILITY chromeOptions)
(.setCapability capabilities "browserName" "electron")

(def remote-web-driver (RemoteWebDriver. (URL. "http://127.0.0.1:9515") capabilities))

;(ChromeDriver. capabilities)




;(def remote-web-driver (RemoteWebDriver. "http://127.0.0.1:9515" capabilities))

0 comments on commit 4c9cc28

Please sign in to comment.