-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Returning shadowRoot element fails with "cyclic object value" error #1711
Comments
It has been mentioned in the other closed issue that this issue may have been fixed since Firefox 67. Geckodriver v0.26.0 In Java, org.openqa.selenium.JavascriptException: Cyclic object value Trace Level Logs 1587018137805 webdriver::server DEBUG -> POST /session/fc2105f3-0b19-4f0c-8715-978cbf9ee5e4/execute/sync { |
Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines. |
Thank you for your response. This was my first time reporting issue. I
followed the Java example to enable the trace level log. And just updated
my post.
Could you review it, and let me know if any other information is needed.
Thank you again,
Julia
…On Wed, Apr 15, 2020 at 10:40 PM Henrik Skupin ***@***.***> wrote:
Could you please attach a trace-level log
<https://firefox-source-docs.mozilla.org/testing/geckodriver/TraceLogs.html>
from geckodriver? Read more about reporting actionable bugs in our contribution
guidelines
<https://firefox-source-docs.mozilla.org/testing/geckodriver/Bugs.html>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1711 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APCT67LWKGSOJR6FU7TO72DRM2K4DANCNFSM4MIIFDIQ>
.
|
Trace Level Logs 1587018137805 webdriver::server DEBUG -> POST /session/fc2105f3-0b19-4f0c-8715-978cbf9ee5e4/execute/sync { |
Thanks. Now I noticed that there is already https://bugzilla.mozilla.org/show_bug.cgi?id=1489490 for specifically this problem. Also the WebDriver spec needs to be updated. See: w3c/webdriver#350 |
As I referred the link, included in the my comment. That it has been tested
with FF67 by that comment author, the shadowRoot was returned without
issue. But I am testing against FF68 ESR, which fails.
…On Thu, Apr 16, 2020 at 11:19 PM Henrik Skupin ***@***.***> wrote:
Thanks. Now I noticed that there is already
https://bugzilla.mozilla.org/show_bug.cgi?id=1489490 for specifically
this problem.
Also the WebDriver spec needs to be updated. See: w3c/webdriver#350
<w3c/webdriver#350>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1711 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APCT67PIK2KT7Y2VATQ7EDTRM7YH7ANCNFSM4MIIFDIQ>
.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Everyone please stop posting "me too" comments on this issue. As you can notice by #1711 (comment) we are aware of this problem, which hasn't been fixed yet. Thanks. |
Using |
Please note that there is no need anymore to use script execution for retrieving the shadow root element given that all the recent Selenium bindings should actually support the Get Element Shadow Root command command and Firefox since version 96 and geckodriver 0.31.0. I'll still try to get the failure for execute script in https://bugzilla.mozilla.org/show_bug.cgi?id=1764594. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@whimboo, at least for the remote driver, the As far as I can see, something like:
is the only way that works for all versions of Chrome. The same approach should also work for Firefox, except for this issue. |
This is mostly fixed with geckodriver 0.33.0 and FF113. instead of the script execution you can use the shadow_root:
you cant use XPATH in shadow_root, and there are some small bugs left. |
Oh right, I should have closed this issue as fixed. Regarding the XPATH issue this is https://bugzilla.mozilla.org/show_bug.cgi?id=1822311 and there needs to be a discussion in the WG group how we want to handle the unsupported strategy - most likely to raise a specific error. |
Even if this is not defined in WebDriver Spec, It is working completely fine with Latest Firefox (V67) and Geckodriver (V0.24).
Please find linked screenshot as proof.
@blackgrouse just need to write case as below
IWebElement finalElement = (IWebElement)((IJavaScriptExecutor)_driver).ExecuteScript("return document.querySelector(\"shop-app\").shadowRoot.querySelector(\"shop-home\").shadowRoot.querySelector(\"div.item > shop-button\"));
You will get your element directly without even iterating
Originally posted by @rudreshtrivedi in #1428 (comment)
The text was updated successfully, but these errors were encountered: