Skip to content

Instantly share code, notes, and snippets.

@els-pnw
Created November 11, 2011 22:02
Show Gist options
  • Save els-pnw/1359448 to your computer and use it in GitHub Desktop.
Save els-pnw/1359448 to your computer and use it in GitHub Desktop.
(defn extract-left-pane-list [loc]
(let [elems (for [index (iterate inc 1)]
(loc (str index)))
;(locators/left-pane-field-list (str index)))
retrieve (fn [elem]
(try (browser getText elem)
(catch Exception e nil)))]
(->> (map retrieve elems) (take-while identity) set)))
=> (extract-left-pane-list locators/left-pane-field-list)
#{"search-1321043503046" "search-1321043278394" "searchuser-1321027010605" "search-1321043743762" "searchuser-1321044905257" "search-1321043594797" "search-1321044232402" "searchuser-1321041309916" "searchuser-1321041084991" "searchuser-1321030335506"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment