 (defn get-element-text-el
   "Returns element's inner text by its identifier."
   [driver el]
+  {:pre [(some? el)]}
   (:value (execute {:driver driver
                     :method :get
                     :path   [:session (:session @driver) :element el :text]})))


(defmethod get-element-location-el :safari
  [driver el]
  (-> (execute {:driver driver
                :method :get
                :path   [:session (:session @driver) :element el :rect]})


(defmethod displayed-el? :default ;;TODO it's only for jwp
  [driver el]
  {:pre [(some? el)]}
  (:value (execute {:driver driver
                    :method :get
                    :path   [:session (:session @driver) :element el :displayed]})))

(defmethod displayed-el? :safari
  [driver el]
  {:pre [(some? el)]}
  (cond
    (= (get-element-css-el driver el :display)
       "none")
