From 404db164f8b357a0e02ab05e07abddcf86ba3f4d Mon Sep 17 00:00:00 2001 From: Ostryak <14109809+Ostryak@users.noreply.github.com> Date: Tue, 13 Nov 2018 15:06:06 +0300 Subject: [PATCH] added capability selenoid.sessionTimeout --- .../pagefactory/support/SelenoidCapabilitiesProvider.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/ru/sbtqa/tag/pagefactory/support/SelenoidCapabilitiesProvider.java b/src/main/java/ru/sbtqa/tag/pagefactory/support/SelenoidCapabilitiesProvider.java index 825f4d2..037e757 100644 --- a/src/main/java/ru/sbtqa/tag/pagefactory/support/SelenoidCapabilitiesProvider.java +++ b/src/main/java/ru/sbtqa/tag/pagefactory/support/SelenoidCapabilitiesProvider.java @@ -27,6 +27,7 @@ public class SelenoidCapabilitiesProvider { private static final String SELENOID_HOST_ENTRIES = Props.get("selenoid.hostEntries"); private static final String SELENOID_APPLICATION_CONTAINERS = Props.get("selenoid.applicationContainers"); private static final String SELENOID_CONTAINER_LABLES = Props.get("selenoid.containerLables"); + private static final String SELENOID_SESSION_TIMEOUT = Props.get("selenoid.sessionTimeout"); public static void apply(DesiredCapabilities capabilities) { @@ -103,6 +104,12 @@ public static void apply(DesiredCapabilities capabilities) { } else { LOG.info("Capability \"labels\" for Selenoid isn't set. Using default capability."); } + + if (!SELENOID_SESSION_TIMEOUT.isEmpty()) { + capabilities.setCapability("sessionTimeout", SELENOID_SESSION_TIMEOUT); + } else { + LOG.info("Capability 'sessionTimeout' for Selenoid isn't set. Using default capability."); + } if (TagWebDriver.getBrowserName().equalsIgnoreCase(BrowserType.OPERA)) { capabilities.setCapability("operaOptions", new HashMap() {