PlaywrightServerOptions Class
The options of a PlaywrightServer.
public sealed class PlaywrightServerOptionsConstructors
| Name | Description |
|---|---|
| PlaywrightServerOptions() |
PlaywrightServerOptions()
PlaywrightServerOptions.cspublic PlaywrightServerOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| AllowAnyClientVersion | Gets or sets whether the clients of another version of Playwright can connect. The protocol changes with each minor version of Playwright: by default, the server rejects the clients whose major and minor versions differ from PlaywrightServer.PlaywrightVersion (as the Playwright server does), with an HTTP 428 response. |
| BindAddress | Gets or sets the address the server listens on. The default is IPAddress.Loopback: only the local clients can connect. |
| BrowserName | Gets or sets the name of the browser reported to the clients (browser.browserType().name()). The clients enable some features depending on it. The default is chromium. |
| DocumentLoader | Gets or sets the loader of the documents and of the resources of the pages (see BrowsingContextOptions.DocumentLoader). The default is null: nothing is fetched from the network, the pages can only use the content set by page.setContent() and the responses of the routes (page.route()). Use DocumentLoader.Create to let the pages load any URL (the clients can then make the server send requests to any host: do not expose such a server to untrusted clients). |
| MaxConnections | Gets or sets the maximum number of simultaneous connections. The default is null: no limit. A client that connects while the limit is reached waits for a connection to close. |
| Path | Gets or sets the path of the WebSocket endpoint (the clients connect to ws://host:port/path). The default is /. Use an unguessable path to prevent the other users of the machine from connecting. |
| Port | Gets or sets the TCP port the server listens on. The default is 0: a free port is chosen (see PlaywrightServer.Port). |
| ScriptEngineOptions | Gets or sets the options of the script engines of the browser contexts (one engine per browser context), e.g. the timeout of a script. The default is null: the default options. |
| UseSystemFonts | Gets or sets whether the pages can use the fonts installed on the machine (see BrowsingContextOptions.UseSystemFonts). The default is false: the pages use the fonts bundled with the library and their web fonts. |
AllowAnyClientVersion
PlaywrightServerOptions.csGets or sets whether the clients of another version of Playwright can connect. The protocol changes with each minor version of Playwright: by default, the server rejects the clients whose major and minor versions differ from PlaywrightServer.PlaywrightVersion (as the Playwright server does), with an HTTP 428 response.
public bool AllowAnyClientVersion { get; set; }Property value
BindAddress
PlaywrightServerOptions.csGets or sets the address the server listens on. The default is IPAddress.Loopback: only the local clients can connect.
public IPAddress BindAddress { get; set; }Property value
BrowserName
PlaywrightServerOptions.csDocumentLoader
PlaywrightServerOptions.csGets or sets the loader of the documents and of the resources of the pages (see BrowsingContextOptions.DocumentLoader). The default is null: nothing is fetched from the network, the pages can only use the content set by page.setContent() and the responses of the routes (page.route()). Use DocumentLoader.Create to let the pages load any URL (the clients can then make the server send requests to any host: do not expose such a server to untrusted clients).
public DocumentLoader? DocumentLoader { get; set; }Property value
MaxConnections
PlaywrightServerOptions.csGets or sets the TCP port the server listens on. The default is 0: a free port is chosen (see PlaywrightServer.Port).
public int Port { get; set; }Property value
ScriptEngineOptions
PlaywrightServerOptions.csGets or sets the options of the script engines of the browser contexts (one engine per browser context), e.g. the timeout of a script. The default is null: the default options.
public JavaScriptScriptEngineOptions? ScriptEngineOptions { get; set; }Property value
UseSystemFonts
PlaywrightServerOptions.csGets or sets whether the pages can use the fonts installed on the machine (see BrowsingContextOptions.UseSystemFonts). The default is false: the pages use the fonts bundled with the library and their web fonts.
public bool UseSystemFonts { get; set; }