Liking cljdoc? Tell your friends :D
Clojure only.

clj-webdriver.form-helpers


IFormHelpercljprotocol

Useful functions for dealing with HTML forms

Useful functions for dealing with HTML forms

quick-fillclj

(quick-fill driver query-action-maps)

driver - browser driver query-action-maps - a seq of maps of queries to actions (queries find HTML elements, actions are fn's that act on them)

Note that a "query" that is just a String will be interpreted as the id attribute of your target element. Note that an "action" that is just a String will be interpreted as a call to input-text with that String for the target text field.

Example usage: (quick-fill a-driver [{"first_name" "Rich"} {{:class "foobar"} click}])

`driver`              - browser driver
`query-action-maps`   - a seq of maps of queries to actions (queries find HTML elements, actions are fn's that act on them)

Note that a "query" that is just a String will be interpreted as the id attribute of your target element.
Note that an "action" that is just a String will be interpreted as a call to `input-text` with that String for the target text field.

Example usage:
(quick-fill a-driver
  [{"first_name" "Rich"}
   {{:class "foobar"} click}])

quick-fill-submitclj

(quick-fill-submit driver query-action-maps)

Same as quick-fill, but expects that the final step in your sequence will submit the form, and therefore clj-webdriver will not return a value (since all page WebElement objects are lost in Selenium-WebDriver's cache after a new page loads)

Same as `quick-fill`, but expects that the final step in your sequence will submit the form, and therefore clj-webdriver will not return a value (since all page WebElement objects are lost in Selenium-WebDriver's cache after a new page loads)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close