diff --git a/appium/tests/helpers/app.ts b/appium/tests/helpers/app.ts index 9303128..1889d94 100644 --- a/appium/tests/helpers/app.ts +++ b/appium/tests/helpers/app.ts @@ -451,11 +451,16 @@ export async function getLogMessages(): Promise { ); } - const selector = - getPlatform() === 'android' - ? 'android=new UiSelector().resourceIdMatches(".*log_entry_.*")' - : '-ios predicate string:name BEGINSWITH "log_entry_"'; - return $$(selector).map((el) => el.getText()); + if (getPlatform() === 'ios') { + return $$('-ios predicate string:name BEGINSWITH "log_entry_"').map((el) => el.getText()); + } + + const entries = $$('android=new UiSelector().resourceIdMatches(".*log_entry_.*")'); + // Flutter Android exposes text labels as content-desc, not text. + if (sdkType === 'flutter') { + return entries.map(async (el) => (await el.getAttribute('content-desc')) ?? ''); + } + return entries.map((el) => el.getText()); } /** Number of log entries that contain every one of `parts`. */