net.serenitybdd.core.pages.JavascriptCompatibleVersion Maven / Gradle / Ivy
package net.serenitybdd.core.pages;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import java.util.Optional;
class JavascriptCompatibleVersion {
public static Optional of(WebDriver driver) {
if (driver instanceof JavascriptExecutor) {
return Optional.of((JavascriptExecutor) driver);
}
return Optional.empty();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy