protractor-cljs is a library for working with the protractor testing framework
Add the following dependency to your project.clj
file:
[protractor-cljs "0.1.3"]
protractor-cljs uses jasmine-cljs
(ns yourapp
(:require-macros [jasmine-cljs.macros :refer [describe it expect dont-expect
before-each after-each xit xdescribe]]
[protractor-cljs.macros :refer [by get-elem browser]]))
(describe "angularjs homepage - cljs"
(it "should greet the named user"
(browser :get "http://www.angularjs.org")
(-> (get-elem (by :model "yourName"))
(.sendKeys "Julie"))
(let [greeting (get-elem (by :binding "yourName"))]
(expect (.getText greeting) :to-equal "Hello Julie!"))))
- The global variable
element
provided by protractor isget-elem
- The global variables
by
andbrowser
are functions that take a keyword and args
Copyright © 2013 Michael Doaty
Distributed under the Eclipse Public License, same as Clojure.