mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
16 lines
670 B
JavaScript
16 lines
670 B
JavaScript
![]() |
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')
|
||
|
})();
|