summaryrefslogtreecommitdiff
path: root/src/main/java/com/mavlushechka/a1qa/driverUtils/WebDriverSingleton.java
blob: ba6f91c1ffc5fbb4bbb722533c100b0390032b7e (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() {
    }

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

        return instance;
    }

}