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

info.novatec.testit.webtester.browser.factories.EdgeFactory Maven / Gradle / Ivy

package info.novatec.testit.webtester.browser.factories;

import info.novatec.testit.webtester.browser.Browser;
import info.novatec.testit.webtester.config.Configuration;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.edge.EdgeOptions;


/**
 * Factory class for creating Microsoft Edge {@link Browser} instances.
 * Needs the {@code webdriver.edge.driver} system property pointing to the driver proxy server executable.
 * 

* The following capabilities are set by default: *

    *
  • Native Events are disabled
  • *
  • Unsigned certificates are accepted
  • *
* * @see Browser * @see EdgeDriver * @since 2.2 */ public class EdgeFactory extends BaseBrowserFactory { private static final String DRIVER_LOCATION = "webdriver.edge.driver"; public EdgeFactory() { super((capabilities) -> { EdgeOptions edgeOptions = new EdgeOptions().merge(capabilities); return new EdgeDriver(edgeOptions); }); } @Override protected void postProcessConfiguration(Configuration configuration) { configuration.getStringProperty(DRIVER_LOCATION).ifPresent(driverLocation -> { System.setProperty(DRIVER_LOCATION, driverLocation); }); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy