Remote Webdriver issue: session not created: No matching capabilities found

3,597 views
Skip to first unread message

Iain Rose

unread,
Nov 8, 2019, 3:51:50 PM11/8/19
to Selenium Users
Hello,

I have a problem with the setup of my remote webdriver session that seemingly appeared overnight. My code used to work but now when I try to pass a value of platform as a capability I'm getting this error:

session not created: No matching capabilities found

My Java code to setup my Webdriver object looks like this:

private void setupRemoteDriver() throws MalformedURLException {
// Set browser to Chrome
ChromeOptions capability = new ChromeOptions();

// Restrict to an OS platform if requested (ANY / VISTA / WIN10)
capability.setCapability("platform", PLATFORM);

// Create new remote webdriver session
driver = new RemoteWebDriver(
new URL("http://" + SELENIUM_HOST + ":" + SELENIUM_PORT + "/wd/hub"),
capability);


My Selenium Grid has the following nodes in it.

Capture.PNG

If I set PLATFORM='ALL', my tests run without issue.

However I need to run my full suite in both Windows 7 and Windows 10, but when I pass a value of VISTA or WIN10 my tests fail to create a webdriver session. Here is the full output:

session not created: No matching capabilities found
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'VDCW764DED019', ip: '172.16.216.46', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_181'
Driver info: driver.version: unknown
remote stacktrace
: Backtrace:
 
Ordinal0 [0x0031A903+1550595]
 
Ordinal0 [0x0029A701+1025793]
 
Ordinal0 [0x0021C6E5+509669]
 
Ordinal0 [0x001CA698+173720]
 
Ordinal0 [0x001CA9CA+174538]
 
Ordinal0 [0x001CA8ED+174317]
 
Ordinal0 [0x001C8CDB+167131]
 
Ordinal0 [0x001B144A+70730]
 
Ordinal0 [0x001B24D0+74960]
 
Ordinal0 [0x001B2469+74857]
 
Ordinal0 [0x002B42C7+1131207]
 
GetHandleVerifier [0x003B70FD+523789]
 
GetHandleVerifier [0x003B6E90+523168]
 
GetHandleVerifier [0x003BE1E7+552695]
 
GetHandleVerifier [0x003B78FA+525834]
 
Ordinal0 [0x002AB7FC+1095676]
 
Ordinal0 [0x002B633B+1139515]
 
Ordinal0 [0x002B64A3+1139875]
 
Ordinal0 [0x002B5425+1135653]
 
BaseThreadInitThunk [0x7561343D+18]
 
RtlInitializeExceptionChain [0x77A99802+99]
 
RtlInitializeExceptionChain [0x77A997D5+54]

I've tried using DesiredCapabilities instead of ChromeOptions but get the same result.

private void setupRemoteDriver() throws MalformedURLException {
// Set browser to Chrome

DesiredCapabilities capability = DesiredCapabilities.chrome();

// Restrict to an OS platform if requested (ANY / VISTA / WIN10)
capability.setCapability("platform", PLATFORM);

// Create new remote webdriver session
driver = new RemoteWebDriver(
new URL("http://" + SELENIUM_HOST + ":" + SELENIUM_PORT + "/wd/hub"),
capability);
}


Can anyone help?


Tricia Crichton

unread,
Nov 13, 2019, 6:22:23 AM11/13/19
to Selenium Users
As of version 77, ChromeDriver compares the requested platform name to the value returned by Chrome. For the Windows version of Chrome, this is "Windows NT". Chrome does not distinguish different Windows versions. ChromeDriver does a startsWith comparison, so this will match a request for "windows" or "any", but there is no way to match to Vista.

Bogdan Sohatskiy

unread,
Mar 7, 2020, 11:47:58 PM3/7/20
to Selenium Users
God how much time I've spent to solve this issue, thank you!

среда, 13 ноября 2019 г., 13:22:23 UTC+2 пользователь Tricia Crichton написал:
Reply all
Reply to author
Forward
0 new messages