Problem

The following error is received during execution of a web cradle script for Internet Explorer browser.

NoSuchWindowException: Unable to find element on closed window

Solution

Set the following capabilities to resolve the issue:

capabilities.setCapability("ignoreProtectedModeSettings", true);
capabilities.setCapability("initialBrowserUrl", "<YOUR_URL>");

Replace <YOUR_URL> with the URL of your application.