@browserbasehq/sdk 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -20
- package/dist/index.d.ts +10 -4
- package/dist/index.js +19 -13
- package/logo/dark.png +0 -0
- package/logo/light.png +0 -0
- package/package.json +1 -1
- package/src/index.ts +48 -28
package/README.md
CHANGED
|
@@ -1,35 +1,69 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="logo/dark.png"/>
|
|
4
|
+
<img alt="Browserbase logo" src="logo/light.png" style="max-width: 250px;"/>
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="https://docs.browserbase.com">Documentation</a>
|
|
10
|
+
<span> · </span>
|
|
11
|
+
<a href="https://www.browserbase.com/playground">Playground</a>
|
|
12
|
+
</p>
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
## Browserbase JS SDK
|
|
16
|
+
|
|
17
|
+
Browserbase is the best developer platform to reliably run, manage, and monitor headless browsers.
|
|
18
|
+
|
|
19
|
+
Get browsers' full control and leverage Browserbase's
|
|
20
|
+
[Infrastructure](https://docs.browserbase.com/under-the-hood), [Stealth Mode](https://docs.browserbase.com/features/stealth-mode), and
|
|
21
|
+
[Session Debugger](https://docs.browserbase.com/features/sessions) to power your automation, test suites,
|
|
22
|
+
and LLM data retrievals.
|
|
4
23
|
|
|
5
24
|
## Installation and setup
|
|
6
25
|
|
|
7
|
-
|
|
8
|
-
- Install the required dependencies:
|
|
26
|
+
### 1. Install the SDK:
|
|
9
27
|
|
|
28
|
+
```bash
|
|
29
|
+
npm install -S @browserbasehq/sdk
|
|
10
30
|
```
|
|
11
|
-
|
|
12
|
-
|
|
31
|
+
|
|
32
|
+
### 2. Get your Browserbase API Key and Project ID:
|
|
33
|
+
|
|
34
|
+
- [Create an account](https://www.browserbase.com/sign-up) or [log in to Browserbase](https://www.browserbase.com/sign-in)
|
|
35
|
+
- Copy your API Key and Project ID [from your Settings page](https://www.browserbase.com/settings)
|
|
13
36
|
|
|
14
37
|
## Usage
|
|
15
38
|
|
|
16
39
|
```js
|
|
17
|
-
import { Browserbase
|
|
40
|
+
import { Browserbase } from '@browserbasehq/sdk'
|
|
18
41
|
|
|
19
42
|
// Init the SDK
|
|
20
43
|
const browserbase = new Browserbase()
|
|
21
44
|
|
|
22
45
|
// Load a webpage
|
|
23
|
-
const
|
|
46
|
+
const rawHtml = await browserbase.load('https://www.browserbase.com')
|
|
24
47
|
|
|
25
48
|
// Load multiple webpages (returns iterator)
|
|
26
|
-
const
|
|
49
|
+
const rawHtmls = browserbase.loadURLs([
|
|
50
|
+
'https://www.browserbase.com',
|
|
51
|
+
'https://docs.browserbase.com',
|
|
52
|
+
])
|
|
53
|
+
|
|
54
|
+
for await (let rawHtml of rawHtmls) {
|
|
55
|
+
// ...
|
|
56
|
+
}
|
|
27
57
|
|
|
28
58
|
// Text-only mode
|
|
29
|
-
const
|
|
59
|
+
const text = await browserbase.load('https://www.browserbase.com', {
|
|
60
|
+
textContent: true,
|
|
61
|
+
})
|
|
30
62
|
|
|
31
63
|
// Screenshot (returns bytes)
|
|
32
|
-
const result = await browserbase.screenshot(
|
|
64
|
+
const result = await browserbase.screenshot('https://www.browserbase.com', {
|
|
65
|
+
textContent: true,
|
|
66
|
+
})
|
|
33
67
|
```
|
|
34
68
|
|
|
35
69
|
### Vercel AI SDK Integration
|
|
@@ -41,29 +75,38 @@ npm i ai openai zod
|
|
|
41
75
|
```
|
|
42
76
|
|
|
43
77
|
```js
|
|
44
|
-
import OpenAI from 'openai'
|
|
78
|
+
import OpenAI from 'openai'
|
|
45
79
|
import { Browserbase } from '@browserbasehq/sdk'
|
|
46
80
|
import { BrowserbaseAISDK } from '@browserbasehq/sdk/dist/integrations/ai-sdk'
|
|
47
|
-
import {
|
|
81
|
+
import {
|
|
82
|
+
OpenAIStream,
|
|
83
|
+
StreamingTextResponse,
|
|
84
|
+
experimental_generateText,
|
|
85
|
+
} from 'ai'
|
|
48
86
|
|
|
49
87
|
// Create new OpenAI client
|
|
50
88
|
const openai = new OpenAI({
|
|
51
89
|
apiKey: process.env.OPENAI_API_KEY,
|
|
52
|
-
})
|
|
90
|
+
})
|
|
53
91
|
|
|
54
92
|
// Init the Browserbase SDK
|
|
55
|
-
const browserbase = new Browserbase()
|
|
93
|
+
const browserbase = new Browserbase()
|
|
56
94
|
|
|
57
95
|
// Init the tool
|
|
58
|
-
const browserTool = BrowserbaseAISDK(browserbase, { textContent: true })
|
|
96
|
+
const browserTool = BrowserbaseAISDK(browserbase, { textContent: true })
|
|
59
97
|
|
|
60
98
|
// Load completions
|
|
61
99
|
const result = await experimental_generateText({
|
|
62
100
|
model: openai.chat('gpt-3.5-turbo'),
|
|
63
101
|
tools: {
|
|
64
|
-
browserTool
|
|
102
|
+
browserTool,
|
|
65
103
|
},
|
|
66
|
-
prompt:
|
|
67
|
-
|
|
68
|
-
});
|
|
104
|
+
prompt: 'What is the weather in San Francisco?',
|
|
105
|
+
})
|
|
69
106
|
```
|
|
107
|
+
|
|
108
|
+
## Further reading
|
|
109
|
+
|
|
110
|
+
- [See how to leverage the Session Debugger for faster development](https://docs.browserbase.com/guides/browser-remote-control#accelerate-your-local-development-with-remote-debugging)
|
|
111
|
+
- [Learn more about Browserbase infrastructure](https://docs.browserbase.com/under-the-hood)
|
|
112
|
+
- [Sessions API Reference](https://docs.browserbase.com/api-reference/list-all-sessions)
|
package/dist/index.d.ts
CHANGED
|
@@ -3,14 +3,18 @@ export type ClientOptions = {
|
|
|
3
3
|
apiKey?: string;
|
|
4
4
|
projectId?: string;
|
|
5
5
|
baseURL?: string;
|
|
6
|
+
baseConnectURL?: string;
|
|
6
7
|
};
|
|
7
|
-
export type
|
|
8
|
+
export type ConnectOptions = {
|
|
8
9
|
sessionId?: string;
|
|
9
|
-
|
|
10
|
+
proxy?: boolean;
|
|
10
11
|
};
|
|
12
|
+
export type LoadOptions = {
|
|
13
|
+
textContent?: boolean;
|
|
14
|
+
} & ConnectOptions;
|
|
11
15
|
export type ScreenshotOptions = {
|
|
12
16
|
fullPage?: boolean;
|
|
13
|
-
};
|
|
17
|
+
} & ConnectOptions;
|
|
14
18
|
export type CreateSessionOptions = {
|
|
15
19
|
projectId?: string;
|
|
16
20
|
extensionId?: string;
|
|
@@ -78,8 +82,10 @@ export type DebugConnectionURLs = {
|
|
|
78
82
|
export default class Browserbase {
|
|
79
83
|
private apiKey;
|
|
80
84
|
private projectId;
|
|
81
|
-
private
|
|
85
|
+
private baseAPIURL;
|
|
86
|
+
private baseConnectURL;
|
|
82
87
|
constructor(options?: ClientOptions);
|
|
88
|
+
connectURL({ sessionId, proxy }?: ConnectOptions): string;
|
|
83
89
|
listSessions(): Promise<Session[]>;
|
|
84
90
|
createSession(options?: CreateSessionOptions): Promise<Session>;
|
|
85
91
|
getSession(sessionId: string): Promise<Session>;
|
package/dist/index.js
CHANGED
|
@@ -3,14 +3,20 @@ import fs from 'fs/promises';
|
|
|
3
3
|
export default class Browserbase {
|
|
4
4
|
apiKey;
|
|
5
5
|
projectId;
|
|
6
|
-
|
|
6
|
+
baseAPIURL;
|
|
7
|
+
baseConnectURL;
|
|
7
8
|
constructor(options = {}) {
|
|
8
9
|
this.apiKey = options.apiKey || process.env.BROWSERBASE_API_KEY;
|
|
9
10
|
this.projectId = options.projectId || process.env.BROWSERBASE_PROJECT_ID;
|
|
10
|
-
this.
|
|
11
|
+
this.baseAPIURL = options.baseURL || 'https://www.browserbase.com';
|
|
12
|
+
this.baseConnectURL =
|
|
13
|
+
options.baseConnectURL || 'wss://connect.browserbase.com';
|
|
14
|
+
}
|
|
15
|
+
connectURL({ sessionId, proxy = false } = {}) {
|
|
16
|
+
return `${this.baseConnectURL}?apiKey=${this.apiKey}${sessionId ? `&sessionId=${sessionId}` : ''}${proxy ? `&enableProxy=true` : ''}`;
|
|
11
17
|
}
|
|
12
18
|
async listSessions() {
|
|
13
|
-
const response = await fetch(`${this.
|
|
19
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions`, {
|
|
14
20
|
headers: {
|
|
15
21
|
'x-bb-api-key': this.apiKey,
|
|
16
22
|
'Content-Type': 'application/json',
|
|
@@ -19,7 +25,7 @@ export default class Browserbase {
|
|
|
19
25
|
return await response.json();
|
|
20
26
|
}
|
|
21
27
|
async createSession(options) {
|
|
22
|
-
const response = await fetch(`${this.
|
|
28
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions`, {
|
|
23
29
|
method: 'POST',
|
|
24
30
|
headers: {
|
|
25
31
|
'x-bb-api-key': this.apiKey,
|
|
@@ -30,7 +36,7 @@ export default class Browserbase {
|
|
|
30
36
|
return await response.json();
|
|
31
37
|
}
|
|
32
38
|
async getSession(sessionId) {
|
|
33
|
-
const response = await fetch(`${this.
|
|
39
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions/${sessionId}`, {
|
|
34
40
|
headers: {
|
|
35
41
|
'x-bb-api-key': this.apiKey,
|
|
36
42
|
'Content-Type': 'application/json',
|
|
@@ -39,7 +45,7 @@ export default class Browserbase {
|
|
|
39
45
|
return await response.json();
|
|
40
46
|
}
|
|
41
47
|
async updateSession(sessionId, options) {
|
|
42
|
-
const response = await fetch(`${this.
|
|
48
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions/${sessionId}`, {
|
|
43
49
|
method: 'POST',
|
|
44
50
|
headers: {
|
|
45
51
|
'x-bb-api-key': this.apiKey,
|
|
@@ -50,7 +56,7 @@ export default class Browserbase {
|
|
|
50
56
|
return await response.json();
|
|
51
57
|
}
|
|
52
58
|
async getSessionRecording(sessionId) {
|
|
53
|
-
const response = await fetch(`${this.
|
|
59
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions/${sessionId}/recording`, {
|
|
54
60
|
headers: {
|
|
55
61
|
'x-bb-api-key': this.apiKey,
|
|
56
62
|
'Content-Type': 'application/json',
|
|
@@ -59,7 +65,7 @@ export default class Browserbase {
|
|
|
59
65
|
return await response.json();
|
|
60
66
|
}
|
|
61
67
|
async getSessionLogs(sessionId) {
|
|
62
|
-
const response = await fetch(`${this.
|
|
68
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions/${sessionId}/logs`, {
|
|
63
69
|
headers: {
|
|
64
70
|
'x-bb-api-key': this.apiKey,
|
|
65
71
|
'Content-Type': 'application/json',
|
|
@@ -70,7 +76,7 @@ export default class Browserbase {
|
|
|
70
76
|
async getSessionDownloads(sessionId, filePath, retryInterval = 2000, retryCount = 2) {
|
|
71
77
|
return new Promise((resolve, reject) => {
|
|
72
78
|
const fetchDownload = async () => {
|
|
73
|
-
const response = await fetch(`${this.
|
|
79
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions/${sessionId}/downloads`, {
|
|
74
80
|
method: 'GET',
|
|
75
81
|
headers: {
|
|
76
82
|
'x-bb-api-key': this.apiKey,
|
|
@@ -94,7 +100,7 @@ export default class Browserbase {
|
|
|
94
100
|
});
|
|
95
101
|
}
|
|
96
102
|
async getDebugConnectionURLs(sessionId) {
|
|
97
|
-
const response = await fetch(`${this.
|
|
103
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions/${sessionId}/debug`, {
|
|
98
104
|
method: 'GET',
|
|
99
105
|
headers: {
|
|
100
106
|
'x-bb-api-key': this.apiKey,
|
|
@@ -119,7 +125,7 @@ export default class Browserbase {
|
|
|
119
125
|
if (!url) {
|
|
120
126
|
throw new Error('Page URL was not provided');
|
|
121
127
|
}
|
|
122
|
-
const browser = await chromium.connectOverCDP(
|
|
128
|
+
const browser = await chromium.connectOverCDP(this.connectURL({ sessionId: options.sessionId, proxy: options.proxy }));
|
|
123
129
|
const defaultContext = browser.contexts()[0];
|
|
124
130
|
const page = defaultContext.pages()[0];
|
|
125
131
|
await page.goto(url);
|
|
@@ -140,7 +146,7 @@ export default class Browserbase {
|
|
|
140
146
|
if (!urls.length) {
|
|
141
147
|
throw new Error('Page URLs were not provided');
|
|
142
148
|
}
|
|
143
|
-
const browser = await chromium.connectOverCDP(
|
|
149
|
+
const browser = await chromium.connectOverCDP(this.connectURL({ sessionId: options.sessionId, proxy: options.proxy }));
|
|
144
150
|
const defaultContext = browser.contexts()[0];
|
|
145
151
|
const page = defaultContext.pages()[0];
|
|
146
152
|
for (const url of urls) {
|
|
@@ -163,7 +169,7 @@ export default class Browserbase {
|
|
|
163
169
|
if (!url) {
|
|
164
170
|
throw new Error('Page URL was not provided');
|
|
165
171
|
}
|
|
166
|
-
const browser = await chromium.connectOverCDP(
|
|
172
|
+
const browser = await chromium.connectOverCDP(this.connectURL({ sessionId: options.sessionId, proxy: options.proxy }));
|
|
167
173
|
const page = await browser.newPage();
|
|
168
174
|
await page.goto(url);
|
|
169
175
|
const screenshot = await page.screenshot({ fullPage: options.fullPage });
|
package/logo/dark.png
ADDED
|
Binary file
|
package/logo/light.png
ADDED
|
Binary file
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -5,16 +5,21 @@ export type ClientOptions = {
|
|
|
5
5
|
apiKey?: string
|
|
6
6
|
projectId?: string
|
|
7
7
|
baseURL?: string
|
|
8
|
+
baseConnectURL?: string
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
export type
|
|
11
|
+
export type ConnectOptions = {
|
|
11
12
|
sessionId?: string
|
|
12
|
-
|
|
13
|
+
proxy?: boolean
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
export type LoadOptions = {
|
|
17
|
+
textContent?: boolean
|
|
18
|
+
} & ConnectOptions
|
|
19
|
+
|
|
15
20
|
export type ScreenshotOptions = {
|
|
16
21
|
fullPage?: boolean
|
|
17
|
-
}
|
|
22
|
+
} & ConnectOptions
|
|
18
23
|
|
|
19
24
|
export type CreateSessionOptions = {
|
|
20
25
|
projectId?: string
|
|
@@ -95,16 +100,25 @@ export type DebugConnectionURLs = {
|
|
|
95
100
|
export default class Browserbase {
|
|
96
101
|
private apiKey: string
|
|
97
102
|
private projectId: string
|
|
98
|
-
private
|
|
103
|
+
private baseAPIURL: string
|
|
104
|
+
private baseConnectURL: string
|
|
99
105
|
|
|
100
106
|
constructor(options: ClientOptions = {}) {
|
|
101
107
|
this.apiKey = options.apiKey || process.env.BROWSERBASE_API_KEY!
|
|
102
108
|
this.projectId = options.projectId || process.env.BROWSERBASE_PROJECT_ID!
|
|
103
|
-
this.
|
|
109
|
+
this.baseAPIURL = options.baseURL || 'https://www.browserbase.com'
|
|
110
|
+
this.baseConnectURL =
|
|
111
|
+
options.baseConnectURL || 'wss://connect.browserbase.com'
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
connectURL({ sessionId, proxy = false }: ConnectOptions = {}): string {
|
|
115
|
+
return `${this.baseConnectURL}?apiKey=${this.apiKey}${
|
|
116
|
+
sessionId ? `&sessionId=${sessionId}` : ''
|
|
117
|
+
}${proxy ? `&enableProxy=true` : ''}`
|
|
104
118
|
}
|
|
105
119
|
|
|
106
120
|
async listSessions(): Promise<Session[]> {
|
|
107
|
-
const response = await fetch(`${this.
|
|
121
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions`, {
|
|
108
122
|
headers: {
|
|
109
123
|
'x-bb-api-key': this.apiKey,
|
|
110
124
|
'Content-Type': 'application/json',
|
|
@@ -115,7 +129,7 @@ export default class Browserbase {
|
|
|
115
129
|
}
|
|
116
130
|
|
|
117
131
|
async createSession(options?: CreateSessionOptions): Promise<Session> {
|
|
118
|
-
const response = await fetch(`${this.
|
|
132
|
+
const response = await fetch(`${this.baseAPIURL}/v1/sessions`, {
|
|
119
133
|
method: 'POST',
|
|
120
134
|
headers: {
|
|
121
135
|
'x-bb-api-key': this.apiKey,
|
|
@@ -128,12 +142,15 @@ export default class Browserbase {
|
|
|
128
142
|
}
|
|
129
143
|
|
|
130
144
|
async getSession(sessionId: string): Promise<Session> {
|
|
131
|
-
const response = await fetch(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
145
|
+
const response = await fetch(
|
|
146
|
+
`${this.baseAPIURL}/v1/sessions/${sessionId}`,
|
|
147
|
+
{
|
|
148
|
+
headers: {
|
|
149
|
+
'x-bb-api-key': this.apiKey,
|
|
150
|
+
'Content-Type': 'application/json',
|
|
151
|
+
},
|
|
152
|
+
}
|
|
153
|
+
)
|
|
137
154
|
|
|
138
155
|
return await response.json()
|
|
139
156
|
}
|
|
@@ -142,21 +159,24 @@ export default class Browserbase {
|
|
|
142
159
|
sessionId: string,
|
|
143
160
|
options: UpdateSessionOptions
|
|
144
161
|
): Promise<Session> {
|
|
145
|
-
const response = await fetch(
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
'
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
162
|
+
const response = await fetch(
|
|
163
|
+
`${this.baseAPIURL}/v1/sessions/${sessionId}`,
|
|
164
|
+
{
|
|
165
|
+
method: 'POST',
|
|
166
|
+
headers: {
|
|
167
|
+
'x-bb-api-key': this.apiKey,
|
|
168
|
+
'Content-Type': 'application/json',
|
|
169
|
+
},
|
|
170
|
+
body: JSON.stringify({ projectId: this.projectId, ...options }),
|
|
171
|
+
}
|
|
172
|
+
)
|
|
153
173
|
|
|
154
174
|
return await response.json()
|
|
155
175
|
}
|
|
156
176
|
|
|
157
177
|
async getSessionRecording(sessionId: string): Promise<SessionRecording[]> {
|
|
158
178
|
const response = await fetch(
|
|
159
|
-
`${this.
|
|
179
|
+
`${this.baseAPIURL}/v1/sessions/${sessionId}/recording`,
|
|
160
180
|
{
|
|
161
181
|
headers: {
|
|
162
182
|
'x-bb-api-key': this.apiKey,
|
|
@@ -170,7 +190,7 @@ export default class Browserbase {
|
|
|
170
190
|
|
|
171
191
|
async getSessionLogs(sessionId: string): Promise<SessionLog[]> {
|
|
172
192
|
const response = await fetch(
|
|
173
|
-
`${this.
|
|
193
|
+
`${this.baseAPIURL}/v1/sessions/${sessionId}/logs`,
|
|
174
194
|
{
|
|
175
195
|
headers: {
|
|
176
196
|
'x-bb-api-key': this.apiKey,
|
|
@@ -191,7 +211,7 @@ export default class Browserbase {
|
|
|
191
211
|
return new Promise<void>((resolve, reject) => {
|
|
192
212
|
const fetchDownload = async () => {
|
|
193
213
|
const response = await fetch(
|
|
194
|
-
`${this.
|
|
214
|
+
`${this.baseAPIURL}/v1/sessions/${sessionId}/downloads`,
|
|
195
215
|
{
|
|
196
216
|
method: 'GET',
|
|
197
217
|
headers: {
|
|
@@ -223,7 +243,7 @@ export default class Browserbase {
|
|
|
223
243
|
sessionId: string
|
|
224
244
|
): Promise<DebugConnectionURLs> {
|
|
225
245
|
const response = await fetch(
|
|
226
|
-
`${this.
|
|
246
|
+
`${this.baseAPIURL}/v1/sessions/${sessionId}/debug`,
|
|
227
247
|
{
|
|
228
248
|
method: 'GET',
|
|
229
249
|
headers: {
|
|
@@ -253,7 +273,7 @@ export default class Browserbase {
|
|
|
253
273
|
}
|
|
254
274
|
|
|
255
275
|
const browser = await chromium.connectOverCDP(
|
|
256
|
-
|
|
276
|
+
this.connectURL({ sessionId: options.sessionId, proxy: options.proxy })
|
|
257
277
|
)
|
|
258
278
|
const defaultContext = browser.contexts()[0]
|
|
259
279
|
const page = defaultContext.pages()[0]
|
|
@@ -284,7 +304,7 @@ export default class Browserbase {
|
|
|
284
304
|
}
|
|
285
305
|
|
|
286
306
|
const browser = await chromium.connectOverCDP(
|
|
287
|
-
|
|
307
|
+
this.connectURL({ sessionId: options.sessionId, proxy: options.proxy })
|
|
288
308
|
)
|
|
289
309
|
const defaultContext = browser.contexts()[0]
|
|
290
310
|
const page = defaultContext.pages()[0]
|
|
@@ -319,7 +339,7 @@ export default class Browserbase {
|
|
|
319
339
|
}
|
|
320
340
|
|
|
321
341
|
const browser = await chromium.connectOverCDP(
|
|
322
|
-
|
|
342
|
+
this.connectURL({ sessionId: options.sessionId, proxy: options.proxy })
|
|
323
343
|
)
|
|
324
344
|
const page = await browser.newPage()
|
|
325
345
|
await page.goto(url)
|