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 );