0

I have a Selenium hub with the 6 nodes registered as follows based on the platform:

  • 3 platfom as WIN10

    Capabilities {browserName: chrome, extension.sikuliCapability: true, maxInstances: 7, platform: WIN10, platformName: WIN10, seleniumProtocol: WebDriver, server:CONFIG_UUID: ae7939e1-25ff-4030-8baf-efe..., version: ANY}
    
  • 3 platform as VISTA

    Capabilities {browserName: chrome, extension.sikuliCapability: true, maxInstances: 7, platform: VISTA, platformName: VISTA, seleniumProtocol: WebDriver, server:..., version: ANY}
    

Is there a way to invoke a chrome browser on a platform by mentioning the OSname i have tried a few options but it looks like hub invokes the drives randomly not based on the os version.

Any insight would be helpful. In some instances the chrome driver crashes when i mention the Chrome driver with WIN10 as below:

SessionId not found. Running the test locally?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.webDriver' defined in class path resource [application-context-web.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.openqa.selenium.WebDriver]: Factory method 'getWebDriver' threw exception; nested exception is org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101'
Driver info: driver.version: unknown
remote stacktrace: Backtrace:
        Ordinal0 [0x00D7D383+3134339]
        Ordinal0 [0x00C6A171+2007409]
        Ordinal0 [0x00B0AEE8+569064]
        Ordinal0 [0x00AB0358+197464]
        Ordinal0 [0x00AAFDC8+196040]
        Ordinal0 [0x00AB0CB7+199863]
        Ordinal0 [0x00AB0C1D+199709]
        Ordinal0 [0x00AAEB0B+191243]
        Ordinal0 [0x00A92E77+77431]
        Ordinal0 [0x00A93E3E+81470]
        Ordinal0 [0x00A93DC9+81353]
        Ordinal0 [0x00C80CD9+2100441]
        GetHandleVerifier [0x00EEB75A+1396954]
        GetHandleVerifier [0x00EEB3D9+1396057]
        GetHandleVerifier [0x00EF7126+1444518]
        GetHandleVerifier [0x00EEBCE8+1398376]
        Ordinal0 [0x00C77F51+2064209]
        Ordinal0 [0x00C822EB+2106091]
        Ordinal0 [0x00C82411+2106385]
        Ordinal0 [0x00C949C4+2181572]
        BaseThreadInitThunk [0x77306359+25]
        RtlGetAppContainerNamedObjectPath [0x77647C24+228]
        RtlGetAppContainerNamedObjectPath [0x77647BF4+180]

Command duration or timeout: 598 milliseconds
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1022)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:345)
        at <packagename>.ThreadScope.get(ThreadScope.java:28)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:340)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35)
        at <packagename>.getTargetObject(PUtils.java:14)
        at <packagename>.setUp(BaseSelTestCase.java:127)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
        at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:589)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.openqa.selenium.WebDriver]: Factory method 'getWebDriver' threw exception; nested exception is org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101'
Driver info: driver.version: unknown
remote stacktrace: Backtrace:
        Ordinal0 [0x00D7D383+3134339]
        Ordinal0 [0x00C6A171+2007409]
        Ordinal0 [0x00B0AEE8+569064]
        Ordinal0 [0x00AB0358+197464]
        Ordinal0 [0x00AAFDC8+196040]
        Ordinal0 [0x00AB0CB7+199863]
        Ordinal0 [0x00AB0C1D+199709]
        Ordinal0 [0x00AAEB0B+191243]
        Ordinal0 [0x00A92E77+77431]
        Ordinal0 [0x00A93E3E+81470]
        Ordinal0 [0x00A93DC9+81353]
        Ordinal0 [0x00C80CD9+2100441]
        GetHandleVerifier [0x00EEB75A+1396954]
        GetHandleVerifier [0x00EEB3D9+1396057]
        GetHandleVerifier [0x00EF7126+1444518]
        GetHandleVerifier [0x00EEBCE8+1398376]
        Ordinal0 [0x00C77F51+2064209]
        Ordinal0 [0x00C822EB+2106091]
        Ordinal0 [0x00C82411+2106385]
        Ordinal0 [0x00C949C4+2181572]
        BaseThreadInitThunk [0x77306359+25]
        RtlGetAppContainerNamedObjectPath [0x77647C24+228]
        RtlGetAppContainerNamedObjectPath [0x77647BF4+180]

Command duration or timeout: 598 milliseconds
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
        ... 26 more
Caused by: org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'XGHSGHSG', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101'
Driver info: driver.version: unknown
remote stacktrace: Backtrace:
        Ordinal0 [0x00D7D383+3134339]
        Ordinal0 [0x00C6A171+2007409]
        Ordinal0 [0x00B0AEE8+569064]
        Ordinal0 [0x00AB0358+197464]
        Ordinal0 [0x00AAFDC8+196040]
        Ordinal0 [0x00AB0CB7+199863]
        Ordinal0 [0x00AB0C1D+199709]
        Ordinal0 [0x00AAEB0B+191243]
        Ordinal0 [0x00A92E77+77431]
        Ordinal0 [0x00A93E3E+81470]
        Ordinal0 [0x00A93DC9+81353]
        Ordinal0 [0x00C80CD9+2100441]
        GetHandleVerifier [0x00EEB75A+1396954]
        GetHandleVerifier [0x00EEB3D9+1396057]
        GetHandleVerifier [0x00EF7126+1444518]
        GetHandleVerifier [0x00EEBCE8+1398376]
        Ordinal0 [0x00C77F51+2064209]
        Ordinal0 [0x00C822EB+2106091]
        Ordinal0 [0x00C82411+2106385]
        Ordinal0 [0x00C949C4+2181572]
        BaseThreadInitThunk [0x77306359+25]
        RtlGetAppContainerNamedObjectPath [0x77647C24+228]
        RtlGetAppContainerNamedObjectPath [0x77647BF4+180]

The node are registered as follows:

{
  "capabilities":
  [{
          "seleniumProtocol": "WebDriver",
          "browserName": "firefox",
          "maxInstances": 4,
          "version": "ANY",
          "platform": "WIN10",
          "firefox_binary":"C:\\Program Files\\Mozilla Firefox\\firefox.exe",
          "extension.sikuliCapability": true
        },
        {
          "seleniumProtocol": "WebDriver",
          "browserName": "chrome",
          "maxInstances": 7,
          "version": "ANY",
          "platform": "WIN10"
        },
        {
          "seleniumProtocol": "WebDriver",
          "browserName": "internet explorer",
          "maxInstances": 1,
          "version": "11",
          "platform": "WIN10"
        },
        {
          "seleniumProtocol": "WebDriver",
          "browserName": "MicrosoftEdge",
          "maxInstances": 1,
          "version": "ANY",
          "platform": "WIN10"
    }
  ],
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 7,
  "port": 5555,
  "register": true,
  "registerCycle": 5000,
  "hub": "http://hubname:4444/hub/wd/",
  "nodeStatusCheckTimeout": 5000,
  "nodePolling": 5000,
  "role": "node",
  "unregisterIfStillDownAfter": 60000,
  "downPollingLimit": 2,
  "debug": false,
}

and

{
  "capabilities":
  [{
    "seleniumProtocol": "WebDriver",
    "browserName": "firefox",
    "maxInstances": 4,
    "version": "ANY",
    "marionette":true,
    "platform": "VISTA",
    "platformName": "VISTA",
    "firefox_binary":"C:\\Program Files\\Mozilla Firefox\\firefox.exe",
    "extension.sikuliCapability": true
  },
    {
      "seleniumProtocol": "WebDriver",
      "browserName": "chrome",
      "maxInstances": 7,
      "version": "ANY",
      "platform": "VISTA",
      "extension.sikuliCapability": true
    }
  ],
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 7,
  "port": 5555,
  "register": true,
  "registerCycle": 5000,
  "hub": "http://callisto.quiacorp.com:4444/hub/wd/",
  "nodeStatusCheckTimeout": 5000,
  "nodePolling": 5000,
  "role": "node",
  "unregisterIfStillDownAfter": 60000,
  "downPollingLimit": 2,
  "debug": false,
  "servlets" : ["io.sterodium.extensions.node.SikuliExtensionServlet","io.sterodium.extensions.node.upload.FileUploadServlet","io.sterodium.extensions.node.download.FileDownloadServlet"],
  "withoutServlets": [],
  "custom": {}
}

Any help in resolving the issue would be appreciated.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
user1999223
  • 41
  • 1
  • 6

1 Answers1

0

This error message...

SessionId not found. Running the test locally?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.webDriver' defined in class path resource [application-context-web.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.openqa.selenium.WebDriver]: Factory method 'getWebDriver' threw exception; nested exception is org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101'
Driver info: driver.version: unknown

...implies that the ChromeDriver was unable to communicate with the Browsing Context i.e. Browser session on WIN10.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

  • Though you are using Selenium version: '3.141.59'.
  • Your java.version: '1.8.0_101' which is old and ancient.

Solution

Ensure that:

  • JDK is upgraded to current levels JDK 8u251.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • I tried with the JDK 11 but i still see this WIN10 Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: '', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.7' Driver info: driver.version: unknown remote stacktrace: Backtrace: Ordinal0 [0x008CD383+3134339] Ordinal0 [0x007BA171+2007409] Ordinal0 [0x0065AEE8+569064] Ordinal0 [0x00600358+197464] – user1999223 Sep 18 '20 at 23:42