Public Vars

Back

get-element-attr (clj)

(source)

function

(get-element-attr driver q attribute)
Have `driver` return value for `attribute` of element found by `q`. Found attribute value is returned as string. When element is found but attribute is absent, returns `nil`. See [[query]] for details on `q`. Note: there is no special treatment of the `class` attribute. A single string with spaces is returned. Example: ```Clojure (def driver (firefox)) (get-element-attr driver {:tag :a} :class) ;; => "link link__external link__button" ```

Examples