All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.thucydides.core.webdriver.DevToolsWebDriverFacade Maven / Gradle / Ivy

There is a newer version: 4.2.8
Show newest version
package net.thucydides.core.webdriver;

import net.thucydides.model.util.EnvironmentVariables;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.HasDevTools;

import java.time.Duration;
import java.util.Optional;

public class DevToolsWebDriverFacade extends WebDriverFacade implements HasDevTools {
    public DevToolsWebDriverFacade(Class driverClass, WebDriverFactory webDriverFactory) {
        super(driverClass, webDriverFactory);
    }

    public DevToolsWebDriverFacade(WebDriver driver, WebDriverFactory webDriverFactory) {
        super(driver, webDriverFactory);
    }

    @Override
    public Optional maybeGetDevTools() {
        if (hasDevTools()) {
            return Optional.of(getDevTools());
        } else {
            return Optional.empty();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy