MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / waitUntilNavigatedTo

Function waitUntilNavigatedTo

apps/automated/src/ui-helper.ts:190–200  ·  view source on GitHub ↗
(page: Page, action: Function)

Source from the content-addressed store, hash-verified

188}
189
190export function waitUntilNavigatedTo(page: Page, action: Function) {
191 let completed = false;
192 function navigatedTo(args) {
193 args.object.page.off('navigatedTo', navigatedTo);
194 completed = true;
195 }
196
197 page.on('navigatedTo', navigatedTo);
198 action();
199 TKUnit.waitUntilReady(() => completed, 5);
200}
201
202export function waitUntilNavigatedFrom(action: Function, topFrame?: Frame) {
203 const currentPage = topFrame ? topFrame.currentPage : Frame.topmost().currentPage;

Callers

nothing calls this directly

Calls 2

onMethod · 0.65
actionFunction · 0.50

Tested by

no test coverage detected