Skip to content

Commit 9fe5661

Browse files
committed
Force the test chromedriver to have a clean exit state
Without this, some tests will report that the browser crashed when it was last started.
1 parent e2acb28 commit 9fe5661

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

java/client/test/org/openqa/selenium/testing/drivers/TestChromeDriver.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ private static DesiredCapabilities chromeWithCustomCapabilities(
8181
Capabilities originalCapabilities) {
8282
ChromeOptions options = new ChromeOptions();
8383
options.addArguments("disable-extensions", "disable-infobars", "disable-breakpad");
84+
Map<String, Object> prefs = new HashMap<>();
85+
prefs.put("exit_type", "None");
86+
prefs.put("exited_cleanly", true);
87+
options.setExperimentalOption("prefs", prefs);
8488
String chromePath = System.getProperty("webdriver.chrome.binary");
8589
if (chromePath != null) {
8690
options.setBinary(new File(chromePath));

0 commit comments

Comments
 (0)