diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e02848b1..1f5dad65e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 18.15.x + node-version: 18 cache: npm - name: Run Tests (macOS, windows) diff --git a/src/browser.ts b/src/browser.ts index c2056c95d..514682d26 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -7,6 +7,7 @@ import { WebDriver, Builder, until, initPageObjects, logging, By } from 'monaco- import { Options, ServiceBuilder } from 'selenium-webdriver/chrome'; import { getLocatorsPath } from 'vscode-extension-tester-locators'; import { CodeUtil, ReleaseQuality } from './util/codeUtil'; +import { NODEJS_VERSION_MAX } from './extester'; export class VSBrowser { static readonly baseVersion = '1.37.0'; @@ -84,6 +85,12 @@ export class VSBrowser { prefs.setLevel(logging.Type.DRIVER, this.logLevel); options.setLoggingPrefs(prefs); + if (process.versions.node > NODEJS_VERSION_MAX) { + console.error(` + WARNING: You are using the unsupported NodeJS version '${process.versions.node}'. The latest supported version is '${NODEJS_VERSION_MAX}'. + We recommend to use supported version to have vscode-extension-tester working properly. + `); + } console.log('Launching browser...'); this._driver = await new Builder() .setChromeService(new ServiceBuilder(path.join(this.storagePath, process.platform === 'win32' ? 'chromedriver.exe' : 'chromedriver'))) diff --git a/src/extester.ts b/src/extester.ts index 39dd4128b..0d8d93d56 100644 --- a/src/extester.ts +++ b/src/extester.ts @@ -29,6 +29,12 @@ export const DEFAULT_SETUP_OPTIONS = { export const VSCODE_VERSION_MIN = '1.81.1'; export const VSCODE_VERSION_MAX = '1.83.1'; +/** + * The latest version of NodeJS which is properly working with selenium-webdriver + * (for more details, see https://www.npmjs.com/package/selenium-webdriver?activeTab=readme#node-support-policy) + */ +export const NODEJS_VERSION_MAX = '18.15.0'; + /** * VSCode Extension Tester */