diff --git a/test/helpers/actions.ts b/test/helpers/actions.ts index 3a23118..8395b2a 100644 --- a/test/helpers/actions.ts +++ b/test/helpers/actions.ts @@ -214,8 +214,8 @@ export async function getTextUnder(containerId: string, index: Index = 'last'): let textEls: ChainablePromiseArray; if (driver.isAndroid) { - // All descendants under the container containing a text attribute - textEls = await container.$$('.//*[@text]'); + // All android.widget.TextView descendants under the container containing a text attribute + textEls = await container.$$('.//android.widget.TextView[@text]'); } else { // All XCUIElementTypeStaticText descendants under the container textEls = await container.$$('.//XCUIElementTypeStaticText');