mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 05:37:20 +03:00
docs: http auth via config (#19643)
Fixes https://github.com/microsoft/playwright/issues/19630
This commit is contained in:
parent
2922eec8e9
commit
a248be86ce
@ -8,9 +8,20 @@ Playwright provides APIs to **monitor** and **modify** network traffic, both HTT
|
||||
|
||||
## HTTP Authentication
|
||||
|
||||
Perform HTTP Authentication with [`method: Browser.newContext`].
|
||||
Perform HTTP Authentication.
|
||||
|
||||
```js
|
||||
```js tab=js-ts
|
||||
const config: PlaywrightTestConfig = {
|
||||
use: {
|
||||
httpCredentials: {
|
||||
username: 'bill',
|
||||
password: 'pa55w0rd',
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```js tab=js-library
|
||||
const context = await browser.newContext({
|
||||
httpCredentials: {
|
||||
username: 'bill',
|
||||
|
Loading…
Reference in New Issue
Block a user