Unable to find element on closed window.

Unable to find element on closed window.

Issue -
Unable to find an element on the closed window using selenium code. As we get the below error
"Unable to find element on closed window". 




How To Reproduce -
- Just remove the capabilities.


Resolution -
Set the following capabilities in the selenium code to resolve the issue:
capabilities.setCapability("ignoreProtectedModeSettings", true);
capabilities.setCapability("initialBrowserUrl", "<YOUR_URL>");



      Links to better reach 

            Bot Store

             EPD