Package org.openqa.selenium
Interface HasAuthentication
-
public interface HasAuthenticationIndicates that a driver supports authenticating to a website in some way.- See Also:
Credentials,UsernameAndPassword
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidregister(java.util.function.Predicate<java.net.URI> whenThisMatches, java.util.function.Supplier<Credentials> useTheseCredentials)Registers a check for whether a set ofCredentialsshould be used for a particular site, identified by its URI.default voidregister(java.util.function.Supplier<Credentials> alwaysUseTheseCredentials)Asregister(Predicate, Supplier)but attempts to apply the credentials for any request for authorization.
-
-
-
Method Detail
-
register
void register(java.util.function.Predicate<java.net.URI> whenThisMatches, java.util.function.Supplier<Credentials> useTheseCredentials)Registers a check for whether a set ofCredentialsshould be used for a particular site, identified by its URI. If called multiple times, the credentials will be checked in the order they've been added and the first one to match will be used.
-
register
default void register(java.util.function.Supplier<Credentials> alwaysUseTheseCredentials)
Asregister(Predicate, Supplier)but attempts to apply the credentials for any request for authorization.
-
-