Example usage for org.openqa.selenium PageLoadStrategy fromString

List of usage examples for org.openqa.selenium PageLoadStrategy fromString

Introduction

In this page you can find the example usage for org.openqa.selenium PageLoadStrategy fromString.

Prototype

public static PageLoadStrategy fromString(String text) 

Source Link

Usage

From source file:com.seleniumtests.core.SeleniumTestsContext.java

License:Apache License

public void setPageLoadStrategy(String strategy) {
    if (strategy != null) {
        PageLoadStrategy pls = PageLoadStrategy.fromString(strategy);
        if (pls == null) {
            throw new ConfigurationException(
                    "PageLoadStrategy values are 'eager', 'normal' (default one) and 'none'");
        }/*from ww  w  .j  a v  a2 s .co m*/
        setAttribute(PAGE_LOAD_STRATEGY, pls);
    } else {
        setAttribute(PAGE_LOAD_STRATEGY, DEFAULT_PAGE_LOAD_STRATEGY);
    }
}