package ru.kovbasa.playwright;

public class TestConfig {

    private final String baseUrl;
    private final boolean headless;
    private final double slowMo;
    private final double timeoutMs;
    private final String browser;

    public TestConfig() {
        this.baseUrl = System.getProperty("baseUrl", "https://otus.ru");
        this.headless = Boolean.parseBoolean(System.getProperty("headless", "true"));
        this.slowMo = Double.parseDouble(System.getProperty("slowMo", "0"));
        this.timeoutMs = Double.parseDouble(System.getProperty("timeoutMs", "40000"));
        this.browser = System.getProperty("browser", "chromium");
    }

    public String getBaseUrl() {
        return baseUrl;
    }

    public boolean isHeadless() {
        return headless;
    }

    public double getSlowMo() {
        return slowMo;
    }

    public double getTimeoutMs() {
        return timeoutMs;
    }

    public String getBrowser() {
        return browser;
    }
}
