Skip to content

Instantly share code, notes, and snippets.

@seabre
Forked from anonymous/core.clj
Last active December 16, 2015 11:19
Show Gist options
  • Save seabre/5426934 to your computer and use it in GitHub Desktop.
Save seabre/5426934 to your computer and use it in GitHub Desktop.
(ns clj-sauce.core
(:require
[clj-webdriver.remote.server :as rs]
[clj-webdriver.taxi :as taxi]
[clj-webdriver.firefox :as ff]))
(defn init-grid
"Initializes the grid code"
[port cred spec]
(let [[this-server this-driver]
(rs/new-remote-session {:port port
:host cred
:existing true}
{:capabilities spec})]
(taxi/set-driver! this-driver)))
;;cred example : USER_NAME:API_KEY@ondemand.saucelabs.com"
(comment
(init-grid 80 cred {"browserName" "chrome", "platform" "LINUX"}))
;Call quit once the grid value is printed
(comment
(taxi/quit))
(defproject clj-sauce "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[clj-webdriver "0.6.0"]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment