KEYCLOAK-9273 Log test browser version

This commit is contained in:
vmuzikar 2019-01-09 15:22:14 +01:00 committed by Stian Thorgersen
parent c4a46a5591
commit 1199376e37

View file

@ -31,6 +31,7 @@ import org.jboss.logging.Logger;
import org.keycloak.testsuite.util.WaitUtils;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
@ -44,6 +45,11 @@ public class KeycloakDronePostSetup {
DronePoint<?> dronePoint = event.getDronePoint();
Object drone = droneContext.get(dronePoint).getInstance();
if (drone instanceof RemoteWebDriver) {
RemoteWebDriver remoteWebDriver = (RemoteWebDriver) drone;
log.infof("Detected browser: %s %s", remoteWebDriver.getCapabilities().getBrowserName(), remoteWebDriver.getCapabilities().getVersion());
}
if (drone instanceof WebDriver && !(drone instanceof AppiumDriver)) {
WebDriver webDriver = (WebDriver) drone;