Hermes Posted March 11, 2021 Share Posted March 11, 2021 Hi, I have the following script: Local $oTest = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, ".create-page") Local $oTest2 = _WD_GetShadowRoot($sSession, $_WD_LOCATOR_ByCSSSelector, "#main", $oTest) Local $oTest3 = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "div.select_container", $oTest2) Local $oTest4 = _WD_GetShadowRoot($sSession, $_WD_LOCATOR_ByTagName, "select-option", $oTest3) Local $oTest5 = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "span.option-primary", $oTest4) $testresult = _WD_ElementAction($sSession, $oTest5, 'click') And i am getting the below error msg when trying to click $otest5 _WD_ElementAction: {"value":{"error":"element not interactable","message":"element not interactable\n And i realized that I cant use ElementAction/ElementOptionSelect since span tag is not a pointer/keyboard interactable. I've thought of using ExecuteScript as an option but i am not too sure on how i can use it, it doesn't work like this: _WD_ExecuteScript($sSession, "arguments[0].click();", $oTest5) Link to comment Share on other sites More sharing options...
Danp2 Posted March 11, 2021 Share Posted March 11, 2021 1 hour ago, Hermes said: span tag is not a pointer/keyboard interactable. Pretty sure that you can at least click on a span element Hard to offer any advice without more details. I see that you are still trying to access the shadow root. Does the above code run without any errors (check Scite output panel)? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Hermes Posted March 12, 2021 Author Share Posted March 12, 2021 @Danp2This has been solved, i was referencing an incorrect element to click on. Danp2 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now