fix(selenium): send additional headers to delete session method (#23719)
In the process of completing the task - https://github.com/microsoft/playwright/pull/23348, I didn't notice the need to pass headers to the session deletion method. So I fixed it here. And support headers for selenium@3.
This commit is contained in:
Родитель
d11bc88784
Коммит
fc8f0101c8
|
@ -216,6 +216,7 @@ export class Chromium extends BrowserType {
|
|||
await fetchData({
|
||||
url: hubUrl + 'session/' + sessionId,
|
||||
method: 'DELETE',
|
||||
headers,
|
||||
}).catch(error => progress.log(`<error disconnecting from selenium>: ${error}`));
|
||||
progress.log(`<selenium> disconnected from sessionId=${sessionId}`);
|
||||
gracefullyCloseSet.delete(disconnectFromSelenium);
|
||||
|
@ -252,6 +253,7 @@ export class Chromium extends BrowserType {
|
|||
url: sessionInfoUrl,
|
||||
method: 'GET',
|
||||
timeout: progress.timeUntilDeadline(),
|
||||
headers,
|
||||
}, seleniumErrorHandler);
|
||||
const proxyId = JSON.parse(sessionResponse).proxyId;
|
||||
endpointURL.hostname = new URL(proxyId).hostname;
|
||||
|
|
Загрузка…
Ссылка в новой задаче