From b4bfbb20f613c423412be5b6ee4ee36bf6740d19 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Mon, 27 Feb 2023 19:43:49 -0800 Subject: [PATCH] chore: update selenium 4 tests to not use /wd/hub (#21240) --- tests/library/browsertype-launch-selenium.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/library/browsertype-launch-selenium.spec.ts b/tests/library/browsertype-launch-selenium.spec.ts index b8b9864181..d9cd9c6adc 100644 --- a/tests/library/browsertype-launch-selenium.spec.ts +++ b/tests/library/browsertype-launch-selenium.spec.ts @@ -103,7 +103,7 @@ test('selenium grid 4.4.0 standalone chromium', async ({ browserName, childProce }); await waitForPort(port); - const __testHookSeleniumRemoteURL = `http://127.0.0.1:${port}/wd/hub`; + const __testHookSeleniumRemoteURL = `http://127.0.0.1:${port}/`; const browser = await browserType.launch({ __testHookSeleniumRemoteURL } as any); const page = await browser.newPage(); await page.setContent('Hello world
Get Started
'); @@ -125,7 +125,7 @@ test('selenium grid 4.4.0 hub + node chromium', async ({ browserName, childProce cwd: __dirname, }); await waitForPort(port); - const __testHookSeleniumRemoteURL = `http://127.0.0.1:${port}/wd/hub`; + const __testHookSeleniumRemoteURL = `http://127.0.0.1:${port}/`; const node = childProcess({ command: ['java', `-Dwebdriver.chrome.driver=${chromeDriver}`, '-jar', selenium_4_4_0, 'node', '--grid-url', `http://127.0.0.1:${port}`, '--port', String(port + 1)], @@ -158,9 +158,9 @@ test('selenium grid 4.4.0 standalone chromium broken driver', async ({ browserNa }); await waitForPort(port); - const __testHookSeleniumRemoteURL = `http://127.0.0.1:${port}/wd/hub`; + const __testHookSeleniumRemoteURL = `http://127.0.0.1:${port}/`; const error = await browserType.launch({ __testHookSeleniumRemoteURL } as any).catch(e => e); - expect(error.message).toContain(`Error connecting to Selenium at http://127.0.0.1:${port}/wd/hub/session: Could not start a new session`); + expect(error.message).toContain(`Error connecting to Selenium at http://127.0.0.1:${port}/session: Could not start a new session`); expect(grid.output).not.toContain('Starting ChromeDriver'); });