Skip to content

Commit

Permalink
Expose HttpRequest and cdp modules as utils. (#4238)
Browse files Browse the repository at this point in the history
  • Loading branch information
garg3133 authored Sep 17, 2024
1 parent da3cc62 commit cf0d45a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
};

0 comments on commit cf0d45a

Please sign in to comment.