File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const fs = require('fs');
8
8
const { By, until, Button} = webdriver ;
9
9
10
10
const USE_HEADLESS = process . env . USE_HEADLESS !== 'no' ;
11
+ const IS_ROOT_USER = process . getuid ( ) == 0 ;
11
12
12
13
// The main reason for this timeout is so that we can control the timeout message and report details;
13
14
// if we hit the Jasmine default timeout then we get a terse message that we can't control.
@@ -63,6 +64,15 @@ class SeleniumHelper {
63
64
args . push ( '--headless' ) ;
64
65
}
65
66
67
+ if ( IS_ROOT_USER ) {
68
+ args . push ( '--no-sandbox' ) ;
69
+ args . push ( '--disable-setuid-sandbox' ) ;
70
+ }
71
+
72
+ args . push ( '--disable-gpu' ) ;
73
+ args . push ( '--disable-dev-shm-usage' ) ;
74
+ args . push ( '--disable-extensions' ) ;
75
+
66
76
// Stub getUserMedia to always not allow access
67
77
args . push ( '--use-fake-ui-for-media-stream=deny' ) ;
68
78
You can’t perform that action at this time.
0 commit comments