fix bug preventing setting a timeout because the capability response is null
@@ -139,11 +139,13 @@ public Object getCapability(String capabilityName) {
private Map<String, Number> getTimeouts() {
Map<String, Number> newTimeouts = new HashMap<>();
Object raw = getCapability(TIMEOUTS);
+ if (raw != null) {
((Map<?, ?>) raw).forEach((key, value) -> {
if (key instanceof String && value instanceof Number) {
newTimeouts.put((String) key, (Number) value);
}
});
+ }
return newTimeouts;
}
}
