From 67ba0054e34cff220e68b457e88a0859114ff250 Mon Sep 17 00:00:00 2001 From: Puja Jagani Date: Wed, 8 May 2024 16:53:35 +0530 Subject: [PATCH] [js] Ensure parity in the locators used by methods (#13902) --- .../node/selenium-webdriver/lib/select.js | 44 ++++++------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/javascript/node/selenium-webdriver/lib/select.js b/javascript/node/selenium-webdriver/lib/select.js index b68286f840692..d341552cabe36 100644 --- a/javascript/node/selenium-webdriver/lib/select.js +++ b/javascript/node/selenium-webdriver/lib/select.js @@ -36,7 +36,7 @@ 'use strict' -const { By, escapeCss } = require('./by') +const { By } = require('./by') const error = require('./error') /** @@ -146,6 +146,10 @@ class Select { * @param {WebElement} element Select WebElement. */ constructor(element) { + if (element === null) { + throw new Error(`Element must not be null. Please provide a valid