doc for appium-test

Former-commit-id: c8d0f590c2
This commit is contained in:
Roman Volosovskyi 2016-05-30 10:22:29 +03:00
parent 3ea8b2cb82
commit eedf38895d
1 changed files with 19 additions and 1 deletions

View File

@ -59,7 +59,25 @@
(defn quit [driver]
(.quit driver))
(defmacro appium-test [name & body]
(defmacro appium-test
"Defines test which will create new appium session and will pass that
session as first argument to each command inside it's body. After execution
of all commands session will be closed.
For instance,
(appium-test my-test
(click :button)
(write :input \"oops\"))
will be expanded to
(deftest my-test
(let [session (init)]
(click session :button)
(write session :input \"oops\")
(quit session)))"
[name & body]
(let [sym (gensym)]
`(deftest ~name
(let [~sym (init)]