From 8eb5e42e16ff177881ba4862ba1bba7f07f8787b Mon Sep 17 00:00:00 2001 From: George Griffiths Date: Fri, 20 Mar 2020 18:01:35 +0000 Subject: [PATCH] add support for custom locators in findElements --- lib/helper/Playwright.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index 04bed1122..ae51dbd7b 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -1986,7 +1986,7 @@ module.exports = Playwright; async function findElements(matcher, locator) { locator = new Locator(locator, 'css'); - if (!locator.isXPath()) return matcher.$$(locator.simplify()); + if (!locator.isXPath()) return matcher.$$(`${locator.type}=${locator.value}`); return matcher.$$(`xpath=${locator.value}`); }