Commit ff2e280
committed
feat: support external browser + page in puppeteer options
allow passing a pre-existing `browser` and `page` via
`options.puppeteer` so the Client can work with a browser
you already control.
when both are provided, the Client skips puppeteer.launch()
and uses them directly.
also uses browser.process() in destroy/logout to decide
cleanup: close() for launched browsers, disconnect() for
connected ones.1 parent b0e8693 commit ff2e280
2 files changed
Lines changed: 25 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
698 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
699 | 704 | | |
700 | 705 | | |
701 | 706 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
446 | 450 | | |
447 | 451 | | |
448 | 452 | | |
| |||
1181 | 1185 | | |
1182 | 1186 | | |
1183 | 1187 | | |
1184 | | - | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
1185 | 1193 | | |
1186 | 1194 | | |
1187 | 1195 | | |
| |||
1193 | 1201 | | |
1194 | 1202 | | |
1195 | 1203 | | |
1196 | | - | |
| 1204 | + | |
| 1205 | + | |
1197 | 1206 | | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
1203 | 1214 | | |
1204 | 1215 | | |
1205 | 1216 | | |
| |||
0 commit comments