feat(element-handle): remove throw in case of empty elementHandle (#2740)

Fixes #2708
This commit is contained in:
Yaniv Efraim
2018-06-15 00:28:52 +03:00
committed by Andrey Lushnikov
parent 38f112f395
commit 9a650c818d
2 changed files with 4 additions and 5 deletions

View File

@@ -306,8 +306,6 @@ class ElementHandle extends JSHandle {
(element, selector) => Array.from(element.querySelectorAll(selector)),
this, selector
);
if (!(await arrayHandle.jsonValue()).length)
throw new Error(`Error: failed to find elements matching selector "${selector}"`);
const result = await this.executionContext().evaluate(pageFunction, arrayHandle, ...args);
await arrayHandle.dispose();