π οΈ Problem: Cannot Find Capabilities When Specifying IE Version
You might encounter this frustrating error when trying to run a Selenium Grid session on Internet Explorer (IE) and specifying a particular version (like 11):
org.openqa.selenium.SessionNotCreatedException: Unable to create session from capabilities
{
browserName: "internet explorer",
version: "11"
}
Build info: version: 'X.Y.Z'
This typically happens when the node doesn’t recognize or accept the specific version being passed in the capabilities
.
π§ Root Cause
Starting from Selenium Grid 4, the use of version
as a browser-specific capability is deprecated and should not be manually set unless absolutely needed.
Also:
- If the IE Driver version doesn’t support the specified version
- Or the Grid node doesn’t have the correct IE version installed
- Or the capability keys are outdated or wrongly formatted
Then, Selenium Grid fails to match the request.
β Solution
βοΈ 1. Do not specify version
unless it’s mandatory
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setBrowserName("internet explorer");
// DON'T use: capabilities.setVersion("11");
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capabilities);
Let Selenium match the default browser version available on the node.
βοΈ 2. Use se:options
if using Selenium Grid 4 with W3C capabilities
Selenium Grid 4 prefers W3C-compliant capabilities. Here’s the correct way to set IE options:
InternetExplorerOptions options = new InternetExplorerOptions();
options.ignoreZoomSettings();
options.requireWindowFocus();
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444"), options);
If you’re still using JSON or Node configuration, ensure the maxInstances
, browserName
, and platform
match the hub’s expectations.
π§ͺ Bonus: Check Selenium Grid Node Configuration
Make sure your IE node is registered properly with:
{
"capabilities": [
{
"browserName": "internet explorer",
"platform": "WINDOWS",
"maxInstances": 1
}
]
}
π§― Still Not Working? Debug Checklist
β
IE is installed and working on the node machine
β
Node can launch IEDriver without Selenium Grid
β
Selenium Grid version is 4.x and compatible with IEDriver
β
IE Enhanced Protected Mode is disabled
β
Zoom level set to 100%
β
Run Grid node as Administrator
π§ Summary
If you’re seeing “Cannot find capabilities” when using Internet Explorer with Selenium Grid, it’s likely due to outdated or incompatible capability configurations.
π Quick Fix:
- Avoid manually setting the IE version
- Use updated W3C-compliant IE options
- Confirm the node has IE configured properly