diff --git a/project.clj b/project.clj index c26d20147..bb6f6376d 100644 --- a/project.clj +++ b/project.clj @@ -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"]] }} + + ) diff --git a/script/dev-install.sh b/script/dev-install.sh new file mode 100644 index 000000000..00a1d81b1 --- /dev/null +++ b/script/dev-install.sh @@ -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 + diff --git a/system-tests.clj b/system-tests.clj new file mode 100644 index 000000000..8c4cc61a7 --- /dev/null +++ b/system-tests.clj @@ -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)) +