File tree Expand file tree Collapse file tree 4 files changed +30
-26
lines changed
Expand file tree Collapse file tree 4 files changed +30
-26
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " selenium-ide" ,
3- "version" : " 4.0.1-alpha.69 " ,
3+ "version" : " 4.0.1-alpha.70 " ,
44 "private" : false ,
55 "description" : " Selenium IDE electron app" ,
66 "author" :
" Todd <[email protected] >" ,
Original file line number Diff line number Diff line change @@ -31,24 +31,13 @@ export const port = app.isPackaged ? 9516 : 9515
3131 */
3232
3333const electronBinary = `chromedriver${ os . platform ( ) === 'win32' ? '.exe' : '' } `
34- const ourElectronPath = app . isPackaged
35- ? path . resolve (
36- path . join (
37- __dirname ,
38- '..' ,
39- 'node_modules' ,
40- 'electron-chromedriver' ,
41- 'bin' ,
42- electronBinary
43- )
44- )
45- : __non_webpack_require__ . resolve (
46- path . join (
47- 'electron-chromedriver' ,
48- 'bin' ,
49- electronBinary
50- )
51- )
34+ const ourElectronPath = __non_webpack_require__ . resolve (
35+ path . join (
36+ 'electron-chromedriver' ,
37+ 'bin' ,
38+ electronBinary
39+ )
40+ )
5241
5342const getDriver = ( { browser, version } : BrowserInfo ) =>
5443 ( browser === 'electron'
Original file line number Diff line number Diff line change @@ -56,13 +56,28 @@ export default class SystemController extends BaseController {
5656 loggerWindow . show ( )
5757 // If automated, assume we already have a chromedriver process running
5858 if ( ! isAutomated ) {
59- const startupError = await this . session . driver . startProcess (
60- this . session . store . get ( 'browserInfo' )
61- )
62- if ( startupError ) {
63- await this . crash (
64- `Unable to startup due to chromedriver error: ${ startupError } `
59+ try {
60+ await this . session . driver . startProcess (
61+ this . session . store . get ( 'browserInfo' )
6562 )
63+ } catch ( e ) {
64+ console . warn ( `
65+ Failed to locate non-electron driver on startup,
66+ Resetting to electron driver.
67+ ` )
68+ await this . session . store . set ( 'browserInfo' , {
69+ browser : 'electron' ,
70+ useBidi : false ,
71+ version : '' ,
72+ } )
73+ const startupError = await this . session . driver . startProcess (
74+ this . session . store . get ( 'browserInfo' )
75+ )
76+ if ( startupError ) {
77+ await this . crash (
78+ `Unable to startup due to chromedriver error: ${ startupError } `
79+ )
80+ }
6681 }
6782 }
6883 await this . session . projects . select ( firstTime )
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export default () => {
3333 const store = new Store < StorageSchema > ( {
3434 defaults : {
3535 browserInfo : {
36- browser : 'chrome ' ,
36+ browser : 'electron ' ,
3737 useBidi : false ,
3838 version : '' ,
3939 } ,
You can’t perform that action at this time.
0 commit comments