List of usage examples for org.openqa.selenium.remote CapabilityType PAGE_LOAD_STRATEGY
String PAGE_LOAD_STRATEGY
To view the source code for org.openqa.selenium.remote CapabilityType PAGE_LOAD_STRATEGY.
Click Source Link
From source file:contentspeededgedriver.ContentSpeedEdgeDriver.java
public static void main(String[] args) { try {/* w w w . ja va 2s . c o m*/ System.setProperty("webdriver.edge.driver", "D:\\Documentatie\\Selenium\\MicrosoftWebDriver.exe"); DesiredCapabilities capabilities = DesiredCapabilities.edge(); capabilities.setCapability(CapabilityType.SUPPORTS_APPLICATION_CACHE, false); LoggingPreferences logPrefs = new LoggingPreferences(); logPrefs.enable(LogType.BROWSER, Level.ALL); logPrefs.enable(LogType.CLIENT, Level.ALL); logPrefs.enable(LogType.DRIVER, Level.ALL); logPrefs.enable(LogType.SERVER, Level.ALL); logPrefs.enable(LogType.PERFORMANCE, Level.ALL); capabilities.setCapability(CapabilityType.LOGGING_PREFS, logPrefs); capabilities.setCapability("browser", "Edge"); capabilities.setCapability("acceptSslCerts", true); capabilities.setCapability(CapabilityType.PAGE_LOAD_STRATEGY, "eager"); capabilities.setCapability("os", "Windows"); capabilities.setCapability("os_version", "10"); driver = new EdgeDriver(capabilities); driver.manage().window().maximize(); // driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); driver.get( "https://www.armonianaturii.ro/ceaiuri-naturale/ceaiuri-medicinale-simple/ceai-conuri-de-hamei-50g-plafar-plaf-00025.html"); objProdus = new ProdusCeai(driver); objProdus.Actions(); driver.quit(); } catch (WebDriverException ex) { ex.printStackTrace(); driver.quit(); } }