Useful functions for dealing with HTML forms
Useful functions for dealing with HTML forms
(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-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)
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |