From 59229caeaa26b647fed96f67bb0bb7393f15c9cb Mon Sep 17 00:00:00 2001 From: toddtarsi Date: Wed, 27 Dec 2023 01:03:48 -0600 Subject: [PATCH] fix binary release pathing --- packages/selenium-ide/package.json | 2 +- .../main/session/controllers/Driver/start.ts | 26 ++++++++++++++----- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/packages/selenium-ide/package.json b/packages/selenium-ide/package.json index 95a6d055f..8175351d8 100644 --- a/packages/selenium-ide/package.json +++ b/packages/selenium-ide/package.json @@ -1,6 +1,6 @@ { "name": "selenium-ide", - "version": "4.0.1-alpha.68", + "version": "4.0.1-alpha.69", "private": false, "description": "Selenium IDE electron app", "author": "Todd ", diff --git a/packages/selenium-ide/src/main/session/controllers/Driver/start.ts b/packages/selenium-ide/src/main/session/controllers/Driver/start.ts index 1491f839b..a4454ea75 100644 --- a/packages/selenium-ide/src/main/session/controllers/Driver/start.ts +++ b/packages/selenium-ide/src/main/session/controllers/Driver/start.ts @@ -30,13 +30,25 @@ export const port = app.isPackaged ? 9516 : 9515 * 4. When Electron is quitting, close the child driver process */ -const ourElectronPath = __non_webpack_require__.resolve( - path.join( - 'electron-chromedriver', - 'bin', - 'chromedriver' + (os.platform() === 'win32' ? '.exe' : '') - ) -) +const electronBinary = `chromedriver${os.platform() === 'win32' ? '.exe' : ''}` +const ourElectronPath = app.isPackaged + ? path.resolve( + path.join( + __dirname, + '..', + 'node_modules', + 'electron-chromedriver', + 'bin', + electronBinary + ) + ) + : __non_webpack_require__.resolve( + path.join( + 'electron-chromedriver', + 'bin', + electronBinary + ) + ) const getDriver = ({ browser, version }: BrowserInfo) => (browser === 'electron'