Fixture.httpAuth Method

Specifies fixture-wide credentials for HTTP Basic and Windows (NTLM) authentication.

Browsers do not display native browser authentication prompts when TestCafe authenticates the user.

fixture.httpAuth(credentials) → this
Parameter Type Description
credentials Object Contains credentials used for authentication.

The credentials parameter has the following properties.

Parameter Type Description
username String Username
password String Password
domain (optional) String Domain name.
workstation (optional) String The workstation’s local network ID

The username and password properties are mandatory. Windows (NTLM) authentication may require additional information, such as workstation ID and domain name.

To specify credentials on a per-test basis, use the test.httpAuth method.