Ahmed Yaslem
Ahmed Yaslem

Reputation: 113

How to configure Selenium Node to run specified OS version?

This is more of a question, can we configure selenium node to run specified OS version. I have a scenario where I need to run some Test in Windows 7 and some in Windows Server 2008 so I don't know if that's possible and if it is possible how to configure it.

Upvotes: 0

Views: 513

Answers (1)

peetya
peetya

Reputation: 3618

You can define your own Capabilities by creating a Custom Capability Matcher and implement it to the Grid.

Or there is another and easier solution :) You work with the applicationName capability and use it to define the name of the node. It is an exist capability, but not documented (I don't know why).

In your nodeConfig:

{
    "capabilities":[
        {
            "platform":"WINDOWS",
            "browserName":"internet explorer",
            "maxInstances":1,
            "seleniumProtocol":"WebDriver",
            "applicationName":"PC001"
        }
    ],
    ...
}

... and in your code:

DesiredCapabilities dc = new DesiredCapabilities();
// ...
dc.setCapability("applicationName", "PC001");

Upvotes: 1

Related Questions