internal async Task <T> EvalOnSelectorAllAsync <T>(bool isPageCall, string selector, string script, object args) => ScriptsHelper.ParseEvaluateResult <T>(await _channel.EvalOnSelectorAllAsync( selector: selector, script: script, isFunction: script.IsJavascriptFunction(), arg: ScriptsHelper.SerializedArgument(args), isPage: isPageCall).ConfigureAwait(false));
internal Task DispatchEventAsync(bool isPageCall, string selector, string type, object eventInit, float?timeout) => _channel.DispatchEventAsync( selector, type, eventInit == null ? EvaluateArgument.Undefined : ScriptsHelper.SerializedArgument(eventInit), timeout, isPageCall);
internal async Task <IJSHandle> WaitForFunctionAsync(bool isPageCall, string expression, object args, float?pollingInterval, float?timeout) => (await _channel.WaitForFunctionAsync( expression: expression, isFunction: expression.IsJavascriptFunction(), arg: ScriptsHelper.SerializedArgument(args), isPage: isPageCall, timeout: timeout, polling: pollingInterval).ConfigureAwait(false)).Object;
/// <inheritdoc /> public Task DispatchEventAsync(string type, object eventInit) => _channel.DispatchEventAsync( type, eventInit == null ? EvaluateArgument.Undefined : ScriptsHelper.SerializedArgument(eventInit));
/// <inheritdoc /> public async Task <JsonElement?> EvaluateAsync(string expression, object arg) => ScriptsHelper.ParseEvaluateResult <JsonElement?>(await _channel.EvaluateExpressionAsync( script: expression, isFunction: expression.IsJavascriptFunction(), arg: ScriptsHelper.SerializedArgument(arg)).ConfigureAwait(false));