au3WebDriver
au3WebDriver copied to clipboard
Shadowroot / Javascript question
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")
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 https://github.com/Danp2/au3WebDriver/issues/26
@mlipok Moved your comments here so that I can keep the other issue from becoming "over loaded". Hope you don't mind. 😃
You can assign this to me.
@mlipok This appears related to #358. Can this one be closed?
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 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
some reading
https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot https://stackoverflow.com/a/34119775/5314940
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
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 .