@@ -8,7 +8,12 @@ import { browserSupportsHeadless } from "../lib/getBrowserString.js";
8
8
// Set script timeout to 10min
9
9
const DRIVER_SCRIPT_TIMEOUT = 1000 * 60 * 10 ;
10
10
11
- export default async function createDriver ( { browserName, headless, url, verbose } ) {
11
+ export default async function createDriver ( {
12
+ browserName,
13
+ headless,
14
+ url,
15
+ verbose
16
+ } ) {
12
17
const capabilities = Capabilities [ browserName ] ( ) ;
13
18
14
19
// Support: IE 11+
@@ -24,6 +29,7 @@ export default async function createDriver( { browserName, headless, url, verbos
24
29
const chromeOptions = new Chrome . Options ( ) ;
25
30
chromeOptions . addArguments ( "--enable-chrome-browser-cloud-management" ) ;
26
31
chromeOptions . addArguments ( "--no-sandbox" ) ;
32
+ chromeOptions . addArguments ( "--disable-dev-shm-usage" ) ;
27
33
28
34
// Alter the chrome binary path if
29
35
// the CHROME_BIN environment variable is set
@@ -46,6 +52,8 @@ export default async function createDriver( { browserName, headless, url, verbos
46
52
47
53
const edgeOptions = new Edge . Options ( ) ;
48
54
edgeOptions . addArguments ( "--enable-chrome-browser-cloud-management" ) ;
55
+ edgeOptions . addArguments ( "--no-sandbox" ) ;
56
+ edgeOptions . addArguments ( "--disable-dev-shm-usage" ) ;
49
57
50
58
// Alter the edge binary path if
51
59
// the EDGE_BIN environment variable is set
@@ -58,7 +66,9 @@ export default async function createDriver( { browserName, headless, url, verbos
58
66
59
67
const ieOptions = new IE . Options ( ) ;
60
68
ieOptions . setEdgeChromium ( true ) ;
61
- ieOptions . setEdgePath ( "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" ) ;
69
+ ieOptions . setEdgePath (
70
+ "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
71
+ ) ;
62
72
63
73
if ( headless ) {
64
74
chromeOptions . addArguments ( "--headless=new" ) ;
@@ -72,7 +82,8 @@ export default async function createDriver( { browserName, headless, url, verbos
72
82
}
73
83
}
74
84
75
- const driver = new Builder ( ) . withCapabilities ( capabilities )
85
+ const driver = new Builder ( )
86
+ . withCapabilities ( capabilities )
76
87
. setChromeOptions ( chromeOptions )
77
88
. setFirefoxOptions ( firefoxOptions )
78
89
. setEdgeOptions ( edgeOptions )
0 commit comments