Skip to content

Commit a57d941

Browse files
fadi-georgeclaude
andcommitted
test: [SDK-5524] find push id in either scroll direction when uncached
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c06752a commit a57d941

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎appium/tests/helpers/app.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,10 @@ export async function waitForInitId(timeoutMs = 30_000): Promise<string> {
657657
const cached = (await getValue('pushId')) as string | undefined;
658658
if (cached) return cached;
659659

660-
const pushIdEl = await scrollToEl('push_id_value', { direction: 'up' });
660+
// Uncached means push hasn't been read this session, so the screen can be above or below it.
661+
const pushIdEl = await scrollToEl('push_id_value', { direction: 'up' }).catch(() =>
662+
scrollToEl('push_id_value', { direction: 'down' }),
663+
);
661664
await driver.waitUntil(
662665
async () => {
663666
const pushId = (await pushIdEl.getText().catch(() => '')).trim();

0 commit comments

Comments
 (0)