internal async Task <ChromiumSession> CreateSessionAsync(Protocol.Target.TargetInfo targetInfo) { string sessionId = (await RootSession.SendAsync(new TargetAttachToTargetRequest { TargetId = targetInfo.TargetId, Flatten = true, }).ConfigureAwait(false)).SessionId; return(await GetSessionAsync(sessionId).ConfigureAwait(false)); }
public static TargetType GetTargetType(this Protocol.Target.TargetInfo targetInfo) => targetInfo.Type switch { "page" => TargetType.Page,
public static TargetType GetTargetType(this Protocol.Target.TargetInfo targetInfo) => targetInfo.Type.ToEnum <TargetType>();