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

import org.openqa.selenium.WebDriver;

public class WebDriverSingleton {

    private static WebDriver instance;


    private WebDriverSingleton() {
    }

    public static WebDriver getInstance() {
        if (instance == null) {
            instance = WebDriverFactory.createWebDriver();
        }

        return instance;
    }

}