Catch all errors in clicking in e2e test

This commit is contained in:
Nicholas Kariniemi 2015-12-11 16:35:12 +02:00
parent 958b6cc5a4
commit 81f4a47d84

View file

@ -33,10 +33,10 @@
(set (map (partial grub-elem-data driver) elems))))
(defn click-random-grub [driver]
(let [elems (get-grub-elems driver)
random-elem (nth elems (rand-int (count elems)))]
(try (taxi/click driver random-elem)
(catch Exception e (println "Click failed")))))
(try (let [elems (get-grub-elems driver)
random-elem (nth elems (rand-int (count elems)))]
(taxi/click driver random-elem))
(catch Exception e (println "Click failed"))))
(defn add-grub-btn [driver]
(taxi/element driver "#add-grub-btn"))