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({
|
await fetchData({
|
||||||
url: hubUrl + 'session/' + sessionId,
|
url: hubUrl + 'session/' + sessionId,
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
|
headers,
|
||||||
}).catch(error => progress.log(`<error disconnecting from selenium>: ${error}`));
|
}).catch(error => progress.log(`<error disconnecting from selenium>: ${error}`));
|
||||||
progress.log(`<selenium> disconnected from sessionId=${sessionId}`);
|
progress.log(`<selenium> disconnected from sessionId=${sessionId}`);
|
||||||
gracefullyCloseSet.delete(disconnectFromSelenium);
|
gracefullyCloseSet.delete(disconnectFromSelenium);
|
||||||
|
@ -252,6 +253,7 @@ export class Chromium extends BrowserType {
|
||||||
url: sessionInfoUrl,
|
url: sessionInfoUrl,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
timeout: progress.timeUntilDeadline(),
|
timeout: progress.timeUntilDeadline(),
|
||||||
|
headers,
|
||||||
}, seleniumErrorHandler);
|
}, seleniumErrorHandler);
|
||||||
const proxyId = JSON.parse(sessionResponse).proxyId;
|
const proxyId = JSON.parse(sessionResponse).proxyId;
|
||||||
endpointURL.hostname = new URL(proxyId).hostname;
|
endpointURL.hostname = new URL(proxyId).hostname;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче