mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-27 21:58:52 +03:00
chore: remove Selenium jar files from repo (#21939)
This commit is contained in:
parent
31e70c17be
commit
054fcd39ba
Binary file not shown.
Binary file not shown.
@ -21,6 +21,14 @@ test('connect to selenium', async ({ exec, tmpWorkspace }, testInfo) => {
|
||||
test.skip(os.platform() !== 'linux');
|
||||
|
||||
await exec('npm i --foreground-scripts playwright-core');
|
||||
await exec(`node download-chromedriver.js ${path.join(tmpWorkspace)}`);
|
||||
await exec(`npm run test -- --reporter=list selenium.spec --output=${testInfo.outputPath('tmp-test-results')}`, { cwd: path.join(__dirname, '..', '..'), env: { PWTEST_CHROMEDRIVER: path.join(tmpWorkspace, 'chromedriver') } });
|
||||
await exec(`node download-chromedriver.js ${tmpWorkspace}`);
|
||||
const seleniumPath = path.join(tmpWorkspace, 'selenium');
|
||||
await exec(`node download-selenium.js ${seleniumPath}`);
|
||||
await exec(`npm run test -- --reporter=list selenium.spec --output=${testInfo.outputPath('tmp-test-results')}`, {
|
||||
cwd: path.join(__dirname, '..', '..'),
|
||||
env: {
|
||||
PWTEST_CHROMEDRIVER: path.join(tmpWorkspace, 'chromedriver'),
|
||||
PWTEST_SELENIUM: seleniumPath,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
15
tests/installation/fixture-scripts/download-selenium.js
Normal file
15
tests/installation/fixture-scripts/download-selenium.js
Normal file
@ -0,0 +1,15 @@
|
||||
const { execSync } = require('child_process');
|
||||
const { mkdirSync } = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
async function downloadFile(url, dir, filename) {
|
||||
const output = path.join(dir, filename);
|
||||
execSync(`curl -L --silent --output ${output} ${url}`);
|
||||
}
|
||||
|
||||
(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-3.141.59/selenium-server-standalone-3.141.59.jar', dir, 'selenium-server-standalone-3.141.59.jar')
|
||||
})();
|
@ -22,8 +22,8 @@ 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');
|
||||
const standalone_3_141_59 = path.join(__dirname, '..', 'assets', 'selenium-grid', 'selenium-server-standalone-3.141.59.jar');
|
||||
const selenium_4_4_0 = path.join(__dirname, '..', 'assets', 'selenium-grid', 'selenium-server-4.4.0.jar');
|
||||
let standalone_3_141_59: string;
|
||||
let selenium_4_4_0: string;
|
||||
|
||||
function writeSeleniumConfig(testInfo: TestInfo, port: number) {
|
||||
const template = path.join(__dirname, '..', 'assets', 'selenium-grid', `selenium-config-standalone.json`);
|
||||
@ -37,6 +37,11 @@ test.skip(({ mode }) => mode !== 'default', 'Using test hooks');
|
||||
test.skip(!chromeDriver);
|
||||
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');
|
||||
});
|
||||
|
||||
test('selenium grid 3.141.59 standalone chromium', async ({ browserName, childProcess, waitForPort, browserType }, testInfo) => {
|
||||
test.skip(browserName !== 'chromium');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user