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

Shadowroot / Javascript question #353

Open
Danp2 opened this issue Jul 28, 2022 · 8 comments
Open

Shadowroot / Javascript question #353

Danp2 opened this issue Jul 28, 2022 · 8 comments

Comments

@Danp2
Copy link
Owner

Danp2 commented Jul 28, 2022

Today a Zul user on AutoIt forum asked for support here:
https://www.autoitscript.com/forum/topic/205553-webdriver-udf-help-support-iii/?do=findComment&comment=1505239

it uses shadow roots.
I have made some analysis and I comes to sucha a nice JS

document.querySelector("body > print-preview-app").shadowRoot.querySelector("#sidebar").shadowRoot.querySelector("print-preview-button-strip").shadowRoot.querySelector("div > cr-button.action-button")

image

Currently I wonder if this javascript snippet

document.querySelector("body > print-preview-app").shadowRoot.querySelector("#sidebar").shadowRoot.querySelector("print-preview-button-strip").shadowRoot.querySelector("div > cr-button.action-button")

will be handy in any way ?

_Originally posted by @mlipok in #26

@Danp2
Copy link
Owner Author

Danp2 commented Jul 28, 2022

@mlipok Moved your comments here so that I can keep the other issue from becoming "over loaded". Hope you don't mind. 😃

@mlipok
Copy link
Contributor

mlipok commented Aug 24, 2022

You can assign this to me.

@Danp2
Copy link
Owner Author

Danp2 commented Mar 3, 2023

@mlipok This appears related to #358. Can this one be closed?

@mlipok
Copy link
Contributor

mlipok commented Mar 3, 2023

Currently I wonder if this javascript snippet

document.querySelector("body > print-preview-app").shadowRoot.querySelector("#sidebar").shadowRoot.querySelector("print-preview-button-strip").shadowRoot.querySelector("div > cr-button.action-button")

will be handy in any way ?

I still wonder what you think about such JS usage in relation to using shadowRoot especially that ASAIK this is not possible with frames, especially to use JS to interact with nested frames from the main document level.

@mlipok
Copy link
Contributor

mlipok commented Mar 3, 2023

@mlipok This appears related to #358. Can this one be closed?

lets stick them separate.

#325 is about _WD_ElementOptionSelect usage
#353 is about JS usage

@mlipok
Copy link
Contributor

mlipok commented Mar 14, 2023

@mlipok
Copy link
Contributor

mlipok commented Mar 23, 2023

https://www.autoitscript.com/forum/topic/208640-webdriver-udf-help-support-iv/?do=findComment&comment=1515550

wondering if such readyState checking is possible:

document.querySelector("body > print-preview-app").shadowRoot.querySelector("#sidebar").shadowRoot.document.readyState

@mlipok
Copy link
Contributor

mlipok commented Mar 23, 2023

wondering if such readyState checking is possible:

document.querySelector("body > print-preview-app").shadowRoot.querySelector("#sidebar").shadowRoot.document.readyState

hm... I rethink this case and I think it was not related. But maybe I'm wrong .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants