Skip to content

Commit 6a00fdc

Browse files
coinzdudeRowdster
andauthored
lf mode for Windows vs code; general exception logging; do not close … (#1364)
* lf mode for Windows vs code; general exception logging; do not close on all windows closed interstitial when not macOS/darwin * vs code, Windows, force kill chromedriver on debug * LF vs CRLF experiment * Revert "LF vs CRLF experiment" This reverts commit 0ea6ed5. Co-authored-by: Robert Castles <[email protected]>
1 parent 2ba28bc commit 6a00fdc

File tree

6 files changed

+130
-6
lines changed

6 files changed

+130
-6
lines changed

Diff for: .prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"trailingComma": "es5",
33
"semi": false,
4-
"singleQuote": true
4+
"singleQuote": true,
5+
"endOfLine": "lf"
56
}

Diff for: packages/selenium-ide/.vscode/launch.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@
88
"cwd": "${workspaceFolder}",
99
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
1010
"windows": {
11+
"preLaunchTask": "stop chromedriver",
12+
"postDebugTask ": {
13+
"task": "stop chromedriver"
14+
},
1115
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
1216
},
1317
"environment": [
1418
{ "name": "ELECTRON_RUN_AS_NODE", "value": "" },
1519
{ "name": "NODE_DEBUG", "value": "api,webdriver" },
1620
{ "name": "NODE_OPTIONS", "value": "--no-warnings" }
1721
],
18-
"args": ["${workspaceFolder}/dist/main-bundle.js"],
22+
"args": ["--trace-uncaught", "${workspaceFolder}/dist/main-bundle.js"],
1923
"outputCapture": "std",
2024
"webRoot": "${workspaceFolder}/dist",
2125
"sourceMaps": true,

Diff for: packages/selenium-ide/.vscode/tasks.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "stop chromedriver",
6+
"command": "taskkill",
7+
"type": "process",
8+
"args": [
9+
"/im",
10+
"chromedriver.exe",
11+
"/f",
12+
"/FI",
13+
"STATUS eq RUNNING"
14+
],
15+
"presentation": {
16+
"reveal": "always"
17+
}
18+
}
19+
]
20+
}

Diff for: packages/selenium-ide/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
]
5656
},
5757
"workspaces": {
58-
"nohoist": ["**/electron-chromedriver"]
58+
"nohoist": [
59+
"**/electron-chromedriver"
60+
]
5961
},
6062
"dependencies": {
6163
"@emotion/react": "^11.8.1",
@@ -70,6 +72,7 @@
7072
"@seleniumhq/side-recorder-postprocessor": "^4.0.0",
7173
"@seleniumhq/side-runtime": "^4.0.0",
7274
"electron-context-menu": "^3.1.2",
75+
"electron-unhandled": "^4.0.1",
7376
"electron-store": "^8.0.0",
7477
"fs-extra": "^8.1.0",
7578
"lodash": "4.17.21",

Diff for: packages/selenium-ide/src/main/index.ts

+15-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ import createSession from './session'
55
import { Session } from './types'
66
import { ChildProcess } from 'child_process'
77

8+
// Capture and show unhandled exceptions
9+
process.on('unhandledRejection', function handleWarning(reason) {
10+
console.log('[PROCESS] Unhandled Promise Rejection')
11+
console.log('- - - - - - - - - - - - - - - - - - -')
12+
console.log(reason)
13+
console.log('- -')
14+
})
15+
16+
process.on('uncaughtException', (error) => {
17+
console.error('Unhandled Error', error)
18+
})
19+
820
// Enable local debugging
921
app.commandLine.appendSwitch('remote-debugging-port', '8315')
1022

@@ -39,9 +51,9 @@ let allWindowsClosed = false
3951
// after all windows have been closed
4052
app.on('window-all-closed', () => {
4153
allWindowsClosed = true
42-
if (process.platform !== 'darwin') {
43-
app.quit()
44-
}
54+
// if (process.platform !== 'darwin') {
55+
// app.quit()
56+
// }
4557
})
4658

4759
// Getting things in a row so that re-activating an app with no windows

Diff for: tests/examples/blank.side

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"id": "3be0bc0c-e709-450e-82da-2662ab918da7",
3+
"version": "3.0",
4+
"name": "New Project",
5+
"url": "http://www.google.com",
6+
"urls": [
7+
"http://www.google.com"
8+
],
9+
"plugins": [],
10+
"suites": [
11+
{
12+
"id": "830394bb-7ddd-47ba-808b-430ff182237d",
13+
"name": "New Suite",
14+
"parallel": false,
15+
"persistSession": false,
16+
"tests": [
17+
"4b7fe050-f171-4d55-acc0-82979b3e5614",
18+
"b393b699-19ca-419e-9fce-c3966711fdab"
19+
],
20+
"timeout": 30000
21+
},
22+
{
23+
"id": "44565e34-48e7-4945-ac71-4ec5d619a562",
24+
"name": "New Suite",
25+
"persistSession": false,
26+
"parallel": false,
27+
"tests": [],
28+
"timeout": 30000
29+
},
30+
{
31+
"id": "ff9f21c6-49fc-4c20-97e9-80c612876853",
32+
"name": "New Suite",
33+
"persistSession": false,
34+
"parallel": false,
35+
"tests": [],
36+
"timeout": 30000
37+
}
38+
],
39+
"tests": [
40+
{
41+
"id": "4b7fe050-f171-4d55-acc0-82979b3e5614",
42+
"name": "New Test",
43+
"commands": [
44+
{
45+
"id": "94bf7bac-d2cb-48a5-89c0-b4da7722b6cd",
46+
"command": "open",
47+
"target": "/",
48+
"value": ""
49+
}
50+
]
51+
},
52+
{
53+
"id": "b393b699-19ca-419e-9fce-c3966711fdab",
54+
"name": "New Test",
55+
"commands": [
56+
{
57+
"id": "11a5f709-2c94-4d43-8c00-83a38ccc80ff",
58+
"command": "open",
59+
"target": "/",
60+
"value": ""
61+
}
62+
]
63+
},
64+
{
65+
"id": "4a91b433-f36b-4ab7-89fa-d0482bafd568",
66+
"name": "New Test",
67+
"commands": [
68+
{
69+
"id": "06a71e51-db0a-4fb0-a96e-f418cfb3ec68",
70+
"command": "open",
71+
"target": "/",
72+
"value": ""
73+
}
74+
]
75+
}
76+
],
77+
"snapshot": {
78+
"dependencies": {},
79+
"tests": [],
80+
"jest": {
81+
"extraGlobals": []
82+
}
83+
}
84+
}

0 commit comments

Comments
 (0)