Skip to content

Commit

Permalink
better quit behavior w/r/t drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
toddtarsi committed Oct 23, 2023
1 parent 2f8e336 commit de83a31
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/selenium-ide/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@seleniumhq/selenium-ide",
"version": "4.0.0-alpha.52",
"version": "4.0.0-alpha.53",
"private": true,
"description": "Selenium IDE electron app",
"author": "Todd <tarsitodd@gmail.com>",
Expand Down
4 changes: 4 additions & 0 deletions packages/selenium-ide/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ app.on('activate', async () => {
}
})

app.on('before-quit', async () => {
await session.system.beforeQuit()
})

app.on('window-all-closed', async () => {
allWindowsClosed = true
if (process.platform === 'darwin') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ export default class SystemController extends BaseController {
throw new Error(error)
}

async quit() {
async beforeQuit() {
await this.shutdown()
await this.session.windows.closeAll()
}

async quit() {
this.beforeQuit()
if (this.isDown) {
this.session.app.quit()
}
Expand Down

0 comments on commit de83a31

Please sign in to comment.