File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ py_library(
325
325
"--instafail" ,
326
326
] + BROWSERS [browser ]["args" ],
327
327
data = BROWSERS [browser ]["data" ],
328
+ env_inherit = ["DISPLAY" ],
328
329
tags = [
329
330
"no-sandbox" ,
330
331
] + BROWSERS [browser ]["tags" ],
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def fin():
127
127
if driver_class == "WPEWebKit" :
128
128
options = get_options (driver_class , request .config )
129
129
if driver_path is not None :
130
- kwargs ["executable_path " ] = driver_path
130
+ kwargs ["service " ] = get_service ( driver_class , driver_path )
131
131
if options is not None :
132
132
kwargs ["options" ] = options
133
133
@@ -169,6 +169,17 @@ def get_options(driver_class, config):
169
169
return options
170
170
171
171
172
+ def get_service (driver_class , executable ):
173
+ # Let the default behaviour be used if we don't set the driver executable
174
+ if not executable :
175
+ return None
176
+
177
+ module = getattr (webdriver , driver_class .lower ())
178
+ service = module .service .Service (executable_path = executable )
179
+
180
+ return service
181
+
182
+
172
183
@pytest .fixture (scope = "session" , autouse = True )
173
184
def stop_driver (request ):
174
185
def fin ():
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ chrome_args = select({
17
17
"@selenium//common:use_pinned_linux_chrome" : [
18
18
"--driver-binary=$(location @linux_chromedriver//:chromedriver)" ,
19
19
"--browser-binary=$(location @linux_chrome//:chrome-linux/chrome)" ,
20
+ "--browser-args=--disable-dev-shm-usage" ,
21
+ "--browser-args=--no-sandbox" ,
20
22
],
21
23
"@selenium//common:use_pinned_macos_chrome" : [
22
24
"--driver-binary=$(location @mac_chromedriver//:chromedriver)" ,
You can’t perform that action at this time.
0 commit comments