Error with newCommandTimeout capability

I am running automation test on .NET but getting this error: “A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): ‘newCommandTimeout’ must be an integer”. How do I resolve this error? This is how I am passing the capability:

    capabilities.setCapability("newCommandTimeout","00:10:00");
1 Like

Hi Helen! Hope you are doing well!

With the “newCommandTimeout” capability, an integer value has to be passed. If a string value is passed, it will give an error. So you can simply use an integer in your code and it should do that trick.

Sample:

    capabilities.setCapability("newCommandTimeout",300);

Hope that helps!

Cheers!

1 Like