From 117b05b375ba8c42829bf1584272f41ea9bf48bb Mon Sep 17 00:00:00 2001 From: jleyba Date: Wed, 5 Jun 2019 09:52:53 -0700 Subject: [PATCH] [js] fix documentation on By.js Fixes #7251 --- javascript/node/selenium-webdriver/lib/by.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/javascript/node/selenium-webdriver/lib/by.js b/javascript/node/selenium-webdriver/lib/by.js index a8aa60e5c0318..8d77c9c01566f 100644 --- a/javascript/node/selenium-webdriver/lib/by.js +++ b/javascript/node/selenium-webdriver/lib/by.js @@ -176,9 +176,12 @@ class By { } /** - * Locates an elements by evaluating a - * {@linkplain webdriver.WebDriver#executeScript JavaScript expression}. - * The result of this expression must be an element or list of elements. + * Locates elements by evaluating a `script` that defines the body of + * a {@linkplain webdriver.WebDriver#executeScript JavaScript function}. + * The return value of this function must be an element or an array-like + * list of elements. When this locator returns a list of elements, but only + * one is expected, the first element in this list will be used as the + * single element value. * * @param {!(string|Function)} script The script to execute. * @param {...*} var_args The arguments to pass to the script.