.registerBasicAuth() Suggest edits
Automate the input of basic auth credentials whenever they arise.
This feature is currently implemented on top of Selenium 4’s CDP(Chrome DevTools Protocol) support, and so only works on those browser that support that protocol
Usage
.registerBasicAuth(username, password, [callback])
Example
module.exports = {
'input basic auth credentials': function (browser) {
browser
.registerBasicAuth('admin', 'admin')
.navigateTo('https://the-internet.herokuapp.com/basic_auth');
}
};
Parameters
Name | Type | description |
---|---|---|
username |
string | |
password |
string | |
callback Optional |
function | Optional callback function to be called when the command finishes. |