From fe2edbdebab6d1685e6eb084c49a716b579d5cb4 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Sat, 4 May 2024 12:31:22 +0000 Subject: [PATCH] [grid][java]: apply protocol version in relay session factory (#13880) Signed-off-by: Viet Nguyen Duc --- .../openqa/selenium/grid/node/relay/RelaySessionFactory.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/org/openqa/selenium/grid/node/relay/RelaySessionFactory.java b/java/src/org/openqa/selenium/grid/node/relay/RelaySessionFactory.java index 5818335af3cdd..889afb5bb958a 100644 --- a/java/src/org/openqa/selenium/grid/node/relay/RelaySessionFactory.java +++ b/java/src/org/openqa/selenium/grid/node/relay/RelaySessionFactory.java @@ -159,6 +159,9 @@ public Either apply(CreateSessionRequest sess ClientConfig clientConfig = ClientConfig.defaultConfig().readTimeout(sessionTimeout).baseUrl(serviceUrl); + if (!serviceProtocolVersion.isEmpty()) { + clientConfig = clientConfig.version(serviceProtocolVersion); + } HttpClient client = clientFactory.createClient(clientConfig); Command command = new Command(null, DriverCommand.NEW_SESSION(capabilities));