File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ py_library(
325325 "--instafail" ,
326326 ] + BROWSERS [browser ]["args" ],
327327 data = BROWSERS [browser ]["data" ],
328+ env_inherit = ["DISPLAY" ],
328329 tags = [
329330 "no-sandbox" ,
330331 ] + BROWSERS [browser ]["tags" ],
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def fin():
127127 if driver_class == "WPEWebKit" :
128128 options = get_options (driver_class , request .config )
129129 if driver_path is not None :
130- kwargs ["executable_path " ] = driver_path
130+ kwargs ["service " ] = get_service ( driver_class , driver_path )
131131 if options is not None :
132132 kwargs ["options" ] = options
133133
@@ -169,6 +169,17 @@ def get_options(driver_class, config):
169169 return options
170170
171171
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+
172183@pytest .fixture (scope = "session" , autouse = True )
173184def stop_driver (request ):
174185 def fin ():
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ chrome_args = select({
1717 "@selenium//common:use_pinned_linux_chrome" : [
1818 "--driver-binary=$(location @linux_chromedriver//:chromedriver)" ,
1919 "--browser-binary=$(location @linux_chrome//:chrome-linux/chrome)" ,
20+ "--browser-args=--disable-dev-shm-usage" ,
21+ "--browser-args=--no-sandbox" ,
2022 ],
2123 "@selenium//common:use_pinned_macos_chrome" : [
2224 "--driver-binary=$(location @mac_chromedriver//:chromedriver)" ,
You can’t perform that action at this time.
0 commit comments