From 24349885d328682dc30279fc2cfba5caee2ca0cd Mon Sep 17 00:00:00 2001 From: Lucy Zhang Date: Tue, 27 Jul 2021 09:15:35 -0700 Subject: [PATCH] fix accept fn for waitForTextContent (#16449) --- test/automation/src/code.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/automation/src/code.ts b/test/automation/src/code.ts index 5880a0333b..209c4a8cb7 100644 --- a/test/automation/src/code.ts +++ b/test/automation/src/code.ts @@ -302,7 +302,7 @@ export class Code { // {{SQL CARBON EDIT}} Print out found element const element = await poll( () => this.driver.getElements(windowId, selector).then(els => els.length > 0 ? Promise.resolve(els[0]) : Promise.reject(new Error('Element not found for textContent'))), - s => accept!(typeof s === 'string' ? s : ''), + s => accept!(typeof s.textContent === 'string' ? s.textContent : ''), `get text content '${selector}'`, retryCount );