Skip to content

Launcher

Namespace: PuppeteerSharp

public class Launcher

Launcher controls the creation of processes or the connection remote ones.

Inheritance: object

View source

public Launcher(ILoggerFactory loggerFactory = null)

Initializes a new instance of the Launcher class.

Parameters

Name Type Description
loggerFactory ILoggerFactory Logger factory.

View source

public LauncherBase Process { get; }

Gets the process, if any was created by this launcher.

Value: LauncherBase

View source

public Task<IBrowser> ConnectAsync(ConnectOptions options)

Attaches Puppeteer to an existing process instance. The browser will be closed when the Browser is disposed.

Parameters

Name Type Description
options ConnectOptions Options for connecting.

Returns: Task<IBrowser> — A connected browser.

View source

[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "The caller is responsible for disposing the returned object.")]
public Task<IBrowser> LaunchAsync(LaunchOptions options)

The method launches a browser instance with given arguments. The browser will be closed when the Browser is disposed.

Parameters

Name Type Description
options LaunchOptions Options for launching the browser.

Returns: Task<IBrowser> — A connected browser.

See <a href=“https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/"&gt;this article</a> for a description of the differences between Chromium and Chrome. <a href=“https://chromium.googlesource.com/chromium/src/+/lkcr/docs/chromium_browser_vs_google_chrome.md"&gt;This article</a> describes some differences for Linux users.

View source

Made with love by Dario Kondratiuk