Package com.microsoft.playwright
Class BrowserType.ConnectOptions
java.lang.Object
com.microsoft.playwright.BrowserType.ConnectOptions
- Enclosing interface:
BrowserType
-
Field Summary
FieldsModifier and TypeFieldDescriptionThis option exposes network available on the connecting client to the browser being connected to.Additional HTTP headers to be sent with web socket connect request.Slows down Playwright operations by the specified amount of milliseconds.Maximum time in milliseconds to wait for the connection to be established. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetExposeNetwork(String exposeNetwork) This option exposes network available on the connecting client to the browser being connected to.setHeaders(Map<String, String> headers) Additional HTTP headers to be sent with web socket connect request.setSlowMo(double slowMo) Slows down Playwright operations by the specified amount of milliseconds.setTimeout(double timeout) Maximum time in milliseconds to wait for the connection to be established.
-
Field Details
-
exposeNetwork
This option exposes network available on the connecting client to the browser being connected to. Consists of a list of rules separated by comma.Available rules:
- Hostname pattern, for example:
example.com,*.org:99,x.*.y.com,*foo.org. - IP literal, for example:
127.0.0.1,0.0.0.0:99,[::1],[0:0::1]:99. -
<loopback>that matches local loopback interfaces:localhost,*.localhost,127.0.0.1,[::1].
Some common examples:
-
"*"to expose all network. -
"<loopback>"to expose localhost network. -
"*.test.internal-domain,*.staging.internal-domain,<loopback>"to expose test/staging deployments and localhost.
- Hostname pattern, for example:
-
headers
Additional HTTP headers to be sent with web socket connect request. Optional. -
slowMo
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0. -
timeout
Maximum time in milliseconds to wait for the connection to be established. Defaults to0(no timeout).
-
-
Constructor Details
-
ConnectOptions
public ConnectOptions()
-
-
Method Details
-
setExposeNetwork
This option exposes network available on the connecting client to the browser being connected to. Consists of a list of rules separated by comma.Available rules:
- Hostname pattern, for example:
example.com,*.org:99,x.*.y.com,*foo.org. - IP literal, for example:
127.0.0.1,0.0.0.0:99,[::1],[0:0::1]:99. -
<loopback>that matches local loopback interfaces:localhost,*.localhost,127.0.0.1,[::1].
Some common examples:
-
"*"to expose all network. -
"<loopback>"to expose localhost network. -
"*.test.internal-domain,*.staging.internal-domain,<loopback>"to expose test/staging deployments and localhost.
- Hostname pattern, for example:
-
setHeaders
Additional HTTP headers to be sent with web socket connect request. Optional. -
setSlowMo
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0. -
setTimeout
Maximum time in milliseconds to wait for the connection to be established. Defaults to0(no timeout).
-