diff --git a/src/main/java/io/github/mfaisalkhatri/drivers/DriverManager.java b/src/main/java/io/github/mfaisalkhatri/drivers/DriverManager.java index 26697a8..9f5ac72 100644 --- a/src/main/java/io/github/mfaisalkhatri/drivers/DriverManager.java +++ b/src/main/java/io/github/mfaisalkhatri/drivers/DriverManager.java @@ -1,14 +1,5 @@ package io.github.mfaisalkhatri.drivers; -import static java.text.MessageFormat.format; - -import java.net.MalformedURLException; -import java.net.URL; -import java.nio.file.Paths; -import java.time.Duration; -import java.util.HashMap; -import java.util.Objects; - import io.github.bonigarcia.wdm.WebDriverManager; import io.github.mfaisalkhatri.enums.Browsers; import org.apache.logging.log4j.LogManager; @@ -19,6 +10,15 @@ import org.openqa.selenium.firefox.FirefoxOptions; import org.openqa.selenium.remote.RemoteWebDriver; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.file.Paths; +import java.time.Duration; +import java.util.HashMap; +import java.util.Objects; + +import static java.text.MessageFormat.format; + /** * @author Faisal Khatri * @since 24/07/2022 @@ -28,8 +28,8 @@ public final class DriverManager { private static final String GRID_URL = "@hub.lambdatest.com/wd/hub"; private static final String HUB_URL = "http://localhost:4444/wd/hub"; private static final Logger LOG = LogManager.getLogger ("DriverManager.class"); - private static final String LT_ACCESS_KEY = System.getenv ("LT_ACCESS_KEY"); - private static final String LT_USERNAME = System.getenv ("LT_USERNAME"); + private static final String LT_ACCESS_KEY = System.getProperty("LT_ACCESS_KEY"); + private static final String LT_USERNAME = System.getProperty("LT_USERNAME"); private static final String NO_SANDBOX = "--no-sandbox"; private static final String DISABLE_DEV_SHM = "--disable-dev-shm-usage"; private static final String CUSTOM_WINDOW_SIZE = "--window-size=1050,600";