/// <inheritdoc cref="IFrame.WaitForFunctionAsync(string, WaitForFunctionOptions, object[])"/> public Task <IJSHandle> WaitForFunctionAsync(string pageFunction, WaitForFunctionOptions options = null, params object[] args) { options ??= new WaitForFunctionOptions { Timeout = Page.DefaultTimeout }; var task = Dom.GetWaitForFunctionTask(null, pageFunction, options, args); return(ScheduleRerunnableTaskAsync(task, ContextType.Main, options.Timeout, $"Function \"{pageFunction}\"")); }
/// <inheritdoc cref="IFrame.WaitForSelectorEvaluateAsync(string, string, WaitForFunctionOptions, object[])"/> public async Task <IJSHandle> WaitForSelectorEvaluateAsync(string selector, string pageFunction, WaitForFunctionOptions options = null, params object[] args) { options ??= new WaitForFunctionOptions { Timeout = Page.DefaultTimeout }; var task = Dom.GetWaitForFunctionTask(selector, pageFunction, options, args); return(await ScheduleRerunnableTaskAsync(task, ContextType.Main, options.Timeout).ConfigureAwait(false)); }