From 81f4a47d844c337df9f74f56825d804ca8c4beb0 Mon Sep 17 00:00:00 2001 From: Nicholas Kariniemi Date: Fri, 11 Dec 2015 16:35:12 +0200 Subject: [PATCH] Catch all errors in clicking in e2e test --- src/test/grub/test/e2e/sync.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/grub/test/e2e/sync.clj b/src/test/grub/test/e2e/sync.clj index a43f6a0..a161420 100644 --- a/src/test/grub/test/e2e/sync.clj +++ b/src/test/grub/test/e2e/sync.clj @@ -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"))