diff --git a/lib/FrameManager.js b/lib/FrameManager.js index 578ac9a73fb..ab645e7c9ea 100644 --- a/lib/FrameManager.js +++ b/lib/FrameManager.js @@ -418,6 +418,8 @@ class Frame { * @return {!Promise>} */ async select(selector, ...values){ + for (const value of values) + console.assert(helper.isString(value), 'Values must be strings. Found value "' + value + '" of type "' + (typeof value) + '"'); return await this.$eval(selector, (element, values) => { if (element.nodeName.toLowerCase() !== 'select') throw new Error('Element is not a ', SX(async function() { let error = null; await page.goto(PREFIX + '/input/select.html'); await page.select('body', '').catch(e => error = e); expect(error.message).toContain('Element is not a