summaryrefslogtreecommitdiff
path: root/src/main/java/com/mavlushechka/a1qa/driverUtils/WebDriverWaitFactory.java
blob: 9a9ac91d459ff652f9ebfe0fa7c3a82271becc17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.mavlushechka.a1qa.driverUtils;

import com.mavlushechka.a1qa.utils.JSONParser;
import org.openqa.selenium.support.ui.WebDriverWait;

import java.time.Duration;

public class WebDriverWaitFactory {

    private WebDriverWaitFactory() {
    }

    public static WebDriverWait createWebDriverWait() {
        return new WebDriverWait(WebDriverSingleton.getInstance(), Duration.ofSeconds(Integer.parseInt(JSONParser.parseData("config", "webDriverWait.durationOfSeconds"))));
    }

}