Skip to content

Commit 0cadcc0

Browse files
committed
[JS] Add code sample for chromeOpts detach
1 parent 7959914 commit 0cadcc0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/javascript/test/browser/chromeSpecificCaps.spec.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,17 @@ suite(function (env) {
2323
await driver.get('https://www.google.com');
2424
await driver.quit();
2525
});
26+
27+
it('Keep browser open - set detach to true ', async function () {
28+
let driver = await env
29+
.builder()
30+
.setChromeOptions(options.detachDriver(true))
31+
.build();
32+
33+
await driver.get('https://www.google.com');
34+
35+
// As tests runs in ci, quitting the driver instance to avoid any failures
36+
await driver.quit();
37+
});
2638
});
2739
});

0 commit comments

Comments
 (0)