From f8497fe73fe577fa5989b10933dcc996f2357a02 Mon Sep 17 00:00:00 2001 From: SavantDhindsaHO Date: Mon, 6 Nov 2023 10:18:19 +0000 Subject: [PATCH] HOF-475: Updated browser.js file to resolve test failure --- test/functional-tests/lib/browser.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/test/functional-tests/lib/browser.js b/test/functional-tests/lib/browser.js index 87fc5b46..4a3e80c1 100644 --- a/test/functional-tests/lib/browser.js +++ b/test/functional-tests/lib/browser.js @@ -1,22 +1,30 @@ 'use strict'; -const webdriverio = require('webdriverio'); +const { remote } = require('webdriverio'); /* const options = { deprecationWarnings: false, desiredCapabilities: { browserName: 'chrome' } }; */ +let browser; +(async () => { + browser = await remote({ + capabilities: { + browserName: 'chrome' + } + }); -const client = webdriverio.remote({ + /* const client = webdriverio.remote({ capabilities: { browserName: 'chrome' } -}); +});*/ -/* const client = webdriverio + /* const client = webdriverio .remote(options); */ -client.addCommand('goto', require('../../../utilities').autofill(client)); + browser.addCommand('goto', require('../../../utilities').autofill(client)); +})().catch(e => console.error(e)); module.exports = () => client.init();