Skip to content

Commit 8b57ab6

Browse files
author
Denys Zaiats
committed
[issue-22] - fix issue with getting caps
1 parent 550ac0e commit 8b57ab6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/main/java/util/driver/WebDriverFactory.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ public class WebDriverFactory {
3434
private RemoteWebDriver remoteWebDriver;
3535
private DesiredCapabilities capabilities;
3636

37-
public WebDriverFactory() {
38-
capabilities = getCapabilities();
39-
LOG.info("Using capabilities: " + capabilities.toString());
40-
remoteUrlPath = getRemoteUrlPath();
41-
}
42-
4337
private static void setChromeDriver() {
4438
Platform platform = Platform.getCurrent();
4539
String chromeBinary = "src/main/resources/drivers/chromedriver"
@@ -65,6 +59,9 @@ private static void setEdgeDriver() {
6559
}
6660

6761
public WebDriver getDriver() {
62+
capabilities = getCapabilities();
63+
LOG.info("Using capabilities: " + capabilities.toString());
64+
remoteUrlPath = getRemoteUrlPath();
6865
if (isMobile()) {
6966
driver = getMobileDriver();
7067
LOG.info("Start Mobile driver");

0 commit comments

Comments
 (0)