diff --git a/javascript/node/selenium-webdriver/test/bidi/network_test.js b/javascript/node/selenium-webdriver/test/bidi/network_test.js index b02684e96bd43..060eec72d3ce5 100644 --- a/javascript/node/selenium-webdriver/test/bidi/network_test.js +++ b/javascript/node/selenium-webdriver/test/bidi/network_test.js @@ -42,7 +42,9 @@ suite( it('can listen to event before request is sent', async function () { let beforeRequestEvent = null await network.beforeRequestSent(function (event) { - beforeRequestEvent = event + if (event.request.url.includes('empty')) { + beforeRequestEvent = event + } }) await driver.get(Pages.emptyPage)