test: update selenium server and try to reenable tests (#22391)
This patch updates selenium server to 4.8.3, hoping that it fixed the issue. Fixes https://github.com/microsoft/playwright/issues/21733
This commit is contained in:
parent
60aba4d394
commit
da87a0af76
|
|
@ -1,4 +0,0 @@
|
|||
Download locations:
|
||||
- https://github.com/SeleniumHQ/selenium/releases/download/selenium-3.141.59/selenium-server-standalone-3.141.59.jar
|
||||
- https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0-rc-1/selenium-server-4.0.0-rc-1.jar
|
||||
|
||||
|
|
@ -10,6 +10,6 @@ async function downloadFile(url, dir, filename) {
|
|||
(async () => {
|
||||
const dir = process.argv[2];
|
||||
mkdirSync(dir);
|
||||
downloadFile('https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.4.0/selenium-server-4.4.0.jar', dir, 'selenium-server-4.4.0.jar')
|
||||
downloadFile('https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.3.jar', dir, 'selenium-server-4.8.3.jar')
|
||||
downloadFile('https://github.com/SeleniumHQ/selenium/releases/download/selenium-3.141.59/selenium-server-standalone-3.141.59.jar', dir, 'selenium-server-standalone-3.141.59.jar')
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import { start } from '../../packages/playwright-core/lib/outofprocess';
|
|||
const chromeDriver = process.env.PWTEST_CHROMEDRIVER;
|
||||
const brokenDriver = path.join(__dirname, '..', 'assets', 'selenium-grid', 'broken-selenium-driver.js');
|
||||
let standalone_3_141_59: string;
|
||||
let selenium_4_4_0: string;
|
||||
let selenium_4_8_3: string;
|
||||
|
||||
function writeSeleniumConfig(testInfo: TestInfo, port: number) {
|
||||
const template = path.join(__dirname, '..', 'assets', 'selenium-grid', `selenium-config-standalone.json`);
|
||||
|
|
@ -39,7 +39,7 @@ test.slow();
|
|||
|
||||
test.beforeAll(() => {
|
||||
standalone_3_141_59 = path.join(process.env.PWTEST_SELENIUM!, 'selenium-server-standalone-3.141.59.jar');
|
||||
selenium_4_4_0 = path.join(process.env.PWTEST_SELENIUM!, 'selenium-server-4.4.0.jar');
|
||||
selenium_4_8_3 = path.join(process.env.PWTEST_SELENIUM!, 'selenium-server-4.8.3.jar');
|
||||
});
|
||||
|
||||
test('selenium grid 3.141.59 standalone chromium', async ({ browserName, childProcess, waitForPort, browserType }, testInfo) => {
|
||||
|
|
@ -98,13 +98,12 @@ test('selenium grid 3.141.59 hub + node chromium', async ({ browserName, childPr
|
|||
await node.waitForOutput('Removing session');
|
||||
});
|
||||
|
||||
test('selenium grid 4.4.0 standalone chromium', async ({ browserName, childProcess, waitForPort, browserType }, testInfo) => {
|
||||
test.fixme(true, 'https://github.com/microsoft/playwright/issues/21733');
|
||||
test('selenium grid 4.8.3 standalone chromium', async ({ browserName, childProcess, waitForPort, browserType }, testInfo) => {
|
||||
test.skip(browserName !== 'chromium');
|
||||
|
||||
const port = testInfo.workerIndex + 15123;
|
||||
const grid = childProcess({
|
||||
command: ['java', `-Dwebdriver.chrome.driver=${chromeDriver}`, '-jar', selenium_4_4_0, 'standalone', '--config', writeSeleniumConfig(testInfo, port)],
|
||||
command: ['java', `-Dwebdriver.chrome.driver=${chromeDriver}`, '-jar', selenium_4_8_3, 'standalone', '--config', writeSeleniumConfig(testInfo, port)],
|
||||
cwd: __dirname,
|
||||
});
|
||||
await waitForPort(port);
|
||||
|
|
@ -122,20 +121,19 @@ test('selenium grid 4.4.0 standalone chromium', async ({ browserName, childProce
|
|||
await grid.waitForOutput('Deleted session');
|
||||
});
|
||||
|
||||
test('selenium grid 4.4.0 hub + node chromium', async ({ browserName, childProcess, waitForPort, browserType }, testInfo) => {
|
||||
test.fixme(true, 'https://github.com/microsoft/playwright/issues/21733');
|
||||
test('selenium grid 4.8.3 hub + node chromium', async ({ browserName, childProcess, waitForPort, browserType }, testInfo) => {
|
||||
test.skip(browserName !== 'chromium');
|
||||
|
||||
const port = testInfo.workerIndex + 15123;
|
||||
const hub = childProcess({
|
||||
command: ['java', '-jar', selenium_4_4_0, 'hub', '--port', String(port)],
|
||||
command: ['java', '-jar', selenium_4_8_3, 'hub', '--port', String(port)],
|
||||
cwd: __dirname,
|
||||
});
|
||||
await waitForPort(port);
|
||||
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)],
|
||||
command: ['java', `-Dwebdriver.chrome.driver=${chromeDriver}`, '-jar', selenium_4_8_3, 'node', '--grid-url', `http://127.0.0.1:${port}`, '--port', String(port + 1)],
|
||||
cwd: __dirname,
|
||||
});
|
||||
await Promise.all([
|
||||
|
|
@ -155,12 +153,12 @@ test('selenium grid 4.4.0 hub + node chromium', async ({ browserName, childProce
|
|||
await hub.waitForOutput('Deleted session');
|
||||
});
|
||||
|
||||
test('selenium grid 4.4.0 standalone chromium broken driver', async ({ browserName, childProcess, waitForPort, browserType }, testInfo) => {
|
||||
test('selenium grid 4.8.3 standalone chromium broken driver', async ({ browserName, childProcess, waitForPort, browserType }, testInfo) => {
|
||||
test.skip(browserName !== 'chromium');
|
||||
|
||||
const port = testInfo.workerIndex + 15123;
|
||||
const grid = childProcess({
|
||||
command: ['java', `-Dwebdriver.chrome.driver=${brokenDriver}`, '-jar', selenium_4_4_0, 'standalone', '--config', writeSeleniumConfig(testInfo, port)],
|
||||
command: ['java', `-Dwebdriver.chrome.driver=${brokenDriver}`, '-jar', selenium_4_8_3, 'standalone', '--config', writeSeleniumConfig(testInfo, port)],
|
||||
cwd: __dirname,
|
||||
});
|
||||
await waitForPort(port);
|
||||
|
|
|
|||
Loading…
Reference in a new issue