Java 类org.openqa.selenium.Beta 实例源码

项目:webtester2-core    文件:AlertHandler.java   
/**
 * Authenticate a Basic-Auth popup using the given username and password.
 * <p>
 * This operation is declared as "BETA" by the Selenium developers and might break in the future in case it changes.
 *
 * @param username the username to use
 * @param password the password to use
 * @see Alert#authenticateUsing(Credentials)
 * @since 2.0
 */
@Beta
public void authenticateWith(String username, String password) {
    authenticateWith(new UserAndPassword(username, password));
}
项目:webtester2-core    文件:AlertHandler.java   
/**
 * Authenticate a Basic-Auth popup using the given {@link Credentials credendials}.
 * <p>
 * This operation is decalred as "BETA" by the Selenium developers and might break in the future in case it changes.
 *
 * @param credentials the credentials to use
 * @see Alert#authenticateUsing(Credentials)
 * @since 2.0
 */
@Beta
public void authenticateWith(Credentials credentials) {
    ActionTemplate.browser(browser()).execute(browser -> webDriver().switchTo().alert().authenticateUsing(credentials));
    log.debug("authenticated using credentials: {}", credentials);
}