From 0cfa862372b4d2316829a1e07b1a24f84d94f455 Mon Sep 17 00:00:00 2001 From: Ezio Li Date: Thu, 11 Jan 2024 14:48:56 +0800 Subject: [PATCH] Add unit test for showbrowser agrument (#458) --- test/browserHelper.test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/browserHelper.test.js b/test/browserHelper.test.js index 392d052e..99121a3a 100644 --- a/test/browserHelper.test.js +++ b/test/browserHelper.test.js @@ -51,5 +51,14 @@ suite('browserHelper', function () { break; } }); + + test('Should return without browser info if Showbrowser argument is set to false', async () => { + var opts = {}; + opts.target = chrome; + opts.url = url; + opts.showBrowser = false; + const browserInfo = await browser.launchBrowser(opts); + assert.strictEqual(browserInfo, undefined); + }); });