Search code examples
javascriptselenium-webdriverjestjsangular-cdk

Unable to close the cdk dropdown in automation using selenium with javascript and jest framewok


In CDK multi-select dropdown, when I click dropdown to open it make a mask on whole screen as a result there are no elements outside that is clickable, due to this I am not able to perform click event on it through selenium webdriver. It always shows an exception that element not interactable and when I provide implicit wait then it does not shows any exception but the dropdown remains open.


Solution

  • I search a lot and finally got a solution that there is an executeScript in selenium web-driver which solve my problem. I used driver.executeScript("") in parameter I inserted DOM method in form of string to click the coordinate to close the dropdown but I don't get how it works.