From eed2f818b3557c5f3250a8092e2bb39f9c0dec4e Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Fri, 26 Apr 2024 12:33:37 +0530 Subject: [PATCH] [grid][java]: apply protocol version in relay session factory 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));