puppeteer/docs/api/puppeteer.connection.session.md

49 lines
492 B
Markdown
Raw Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: Connection.session
---
# Connection.session() method
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class Connection {
session(sessionId: string): CDPSession | null;
}
```
## Parameters
<table><thead><tr><th>
2022-07-05 13:41:43 +00:00
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
sessionId
</td><td>
string
</td><td>
The session id
</td></tr>
</tbody></table>
2022-07-05 13:41:43 +00:00
**Returns:**
[CDPSession](./puppeteer.cdpsession.md) \| null
The current CDP session if it exists