au3WebDriver
au3WebDriver copied to clipboard
_WD_ElementOptionSelect and ShadowRoots
https://www.autoitscript.com/forum/topic/205553-webdriver-udf-help-support-iii/?do=findComment&comment=1505361
Yes I know that we must to check it deeply. Thanks for setting this here as an important thing.
Doesn't this link clearly tell us that it works?
https://www.autoitscript.com/forum/topic/205553-webdriver-udf-help-support-iii/?do=findComment&comment=1505239
I don't think so. Are you confusing _WD_ElementSelectAction
with _WD_ElementOptionSelect
?
https://www.autoitscript.com/forum/topic/205553-webdriver-udf-help-support-iii/?do=findComment&comment=1505364
@Zul You may be correct. _WD_ElementOptionSelect is the correct choice, expect when a shadow root is involved.
I will start with snipped posted here: https://www.autoitscript.com/forum/topic/205553-webdriver-udf-help-support-iii/?do=findComment&comment=1505239
and check if WD_ElementOptionSelect and ShadowRoots
works or not.
Ok, but I'm fairly confident that I already confirmed that it doesn't work when shadowroots are involved.
But need to be tested why it works with _WD_ElementSelectAction
and not with _WD_ElementOptionSelect
?
Thus I need to start with comparatable working solution.
_WD_ElementSelectAction
is designed to interact with an element that was previously located via _WD_FindElement. If you look at the code originally posted by @zul, you'll see that it uses _WD_FindElement
and _WD_GetShadowRoot
to access and locate the target element prior to calling _WD_ElementSelectAction
.
_WD_ElementOptionSelect
is designed to located then click on a Select element's options. It doesn't yet contain any logic to local Select elements inside a shadow root.