-
Notifications
You must be signed in to change notification settings - Fork 96
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
child
and children
cannot use vector as q
#559
Comments
I'm working on this one. |
After looking into this, I have a few thoughts.
Recommendations:
This would provide Simpler alternative proposals:
|
Wow, nice analysis! Thanks @dgr! I like all of your primary recommendations (1 through 4). Please proceed as you see fit. If you feel it helps, feel free to break work down into separate PRs. |
I've been looking at chromedriver source, and lo and behold, I might have found the influence for the odd naming of FIND_CHILD_ELEMENT = (_Method.POST, '/session/:sessionId/element/:id/element')
FIND_CHILD_ELEMENTS = (
_Method.POST, '/session/:sessionId/element/:id/elements') |
Interesting. Looks like those were older legacy names that got turned into Find Element(s) From Element in the later versions of the WebDriver spec. Seems like a graceful renaming is therefore warranted. |
* Add query-from and query-all-from * Deprecate child and children * Make get-active-element a public API Previously, get-active-element* was a private API. This simply changes the name to remove the "*" and makes it public. * Update doc strings and user guide to deprecate :active Suggests to use get-active-element instead of (query driver :active). * Modify get-active-element to use unwrap-webdriver-object * Update CHANGELOG to better reflect issue 559 changes * Fix redundant let found by clj-kondo * Suppress clj-kondo warnings for calling deprecated child/children * Suppress Eastwood warnings for calling deprecated child/children Test suite still calls child/children to detect regressions in these deprecated, but not yet removed, functions. * Credit dgr in CHANGELOG * Clarify issues with :active in User Guide and query doc string
Version
1.0.40
Platform
Operating System: macOS 12.7.2
Clojure version: 1.11.1
JDK vendor and version: 21.0.2
Browser vendor: chrome
Browser version: 120.0.6099.216
WebDriver version: 120.0.6099.109
(also happens in the newest firefox version and geckodriver version)
Symptom
The test html file:
Here's the clj file
As the comment, if I use the vector as the
q
, it will throw an error:Wrong query: [{:tag :thead} {:tag :th, :index 8}]
Both
child
andchildren
have this problem, while the doc sayshttps://cljdoc.org/d/etaoin/etaoin/1.0.40/api/etaoin.api#child
Actual behavior
Throw an error
Expected behavior
Work like
query
query-all
Diagnosis
No idea.. I'm a clj noobie just learning to use clojure...
Action
Just report, doesn't have the ability to fix this, let me know if you have any more question ;)
The text was updated successfully, but these errors were encountered: