From cf0d45a2dd018c75691f28b0545cb4421771222a Mon Sep 17 00:00:00 2001 From: Priyansh Garg Date: Tue, 17 Sep 2024 23:34:54 +0530 Subject: [PATCH] Expose HttpRequest and cdp modules as utils. (#4238) --- lib/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/index.js b/lib/index.js index ce32f930e0..11eb1129d1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -6,6 +6,8 @@ const ElementGlobal = require('./api/_loaders/element-global.js'); const NightwatchClient = require('./core/client.js'); const namespacedApi = require('./core/namespaced-api.js'); const {NightwatchEventHub} = require('./runner/eventHub'); +const HttpRequest = require('./http/request.js'); +const cdp = require('./transport/selenium-webdriver/cdp.js'); const {Logger} = Utils; @@ -483,3 +485,9 @@ const globalBrowserDescriptor = { }; Object.defineProperty(Nightwatch, 'browser', globalBrowserDescriptor); Object.defineProperty(Nightwatch, 'app', globalBrowserDescriptor); + +// expose some internal modules for direct use +module.exports.utils = { + HttpRequest, + cdp +};