Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated CHANGELOG for issue #620 #634

Merged
merged 2 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ A release with an intentional breaking changes is marked with:
* Changes
** {issue}559[#559]: Create `query-from` and `query-all-from` as replacements for `child` and `children`. Rewrite logic such that `q` parameter allows for vector syntax similar to `query` and `query-all`. Deprecate `child` and `children`. ({person}dgr[@dgr])
** {issue}559[#559]: Make `get-active-element` a public API. This was previously private. ({person}dgr[@dgr])
** {issue}620[#620]: Get stricter when unwrapping elements. ({person}dgr[@dgr])

* Docs
** {issue}559[#559]: Deprecate use of `:active` with `query` and other APIs that use `query` under the hood. ({person}dgr[@dgr])
Expand Down
19 changes: 9 additions & 10 deletions src/etaoin/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,7 @@
:path [:session (:session driver) :element]
:data {:using locator :value term}})
:value
first
second))
(unwrap-webdriver-object web-element-identifier)))

(defn ^:no-doc find-elements*
[driver locator term]
Expand All @@ -544,7 +543,7 @@
:path [:session (:session driver) :elements]
:data {:using locator :value term}})
:value
(mapv (comp second first))))
(mapv #(unwrap-webdriver-object % web-element-identifier))))

(defn- find-element-from*
[driver el locator term]
Expand All @@ -554,8 +553,7 @@
:path [:session (:session driver) :element el :element]
:data {:using locator :value term}})
:value
first
second))
(unwrap-webdriver-object web-element-identifier)))

(defn- find-elements-from*
[driver el locator term]
Expand All @@ -565,7 +563,7 @@
:path [:session (:session driver) :element el :elements]
:data {:using locator :value term}})
:value
(mapv (comp second first))))
(mapv #(unwrap-webdriver-object % web-element-identifier))))

(defn- follow-path-from-element*
"Starting at `el`, search for the first query in `path`, then from the
Expand Down Expand Up @@ -1476,7 +1474,7 @@
(defmethod get-element-shadow-root*
:safari
[driver el]
;; Safari gives us the shadow root in a non-standard wrapper
;; As of Aug 2024, Safari gives us the shadow root in a non-standard wrapper
(when-let [root (get-element-property-el driver el "shadowRoot")]
(-> root first second)))

Expand Down Expand Up @@ -1688,10 +1686,11 @@
(defn el->ref
"Return map representing an element reference for WebDriver.

The magic `:element-` constant in source is taken from the [WebDriver Spec](https://www.w3.org/TR/webdriver2/#elements).
The magic `web-element-identifier` constant in the source is
taken from the [WebDriver Spec](https://www.w3.org/TR/webdriver2/#elements).

Passing the element reference map to `js-execute` automatically expands it
into a DOM node. For example:
Passing the element reference map to `js-execute` automatically
expands it into a DOM node. For example:

```Clojure
;; returns UUID string for the element
Expand Down
Loading