View Source PhoenixTest.Playwright.Connection (PhoenixTestPlaywright v0.4.0)
Stateful, GenServer
based connection to a Playwright node.js server.
The connection is established via Playwright.Port
.
You won't usually have to use this module directly.
PhoenixTest.Case
uses this under the hood.
Summary
Functions
Returns a specification to start this module under a supervisor.
Lazy launch. Only start the playwright server if actually needed by a test.
Get the initializer data for a channel.
Launch a browser and return its guid
.
Post a message and await the response. We wait for an additional grace period after the timeout that we pass to playwright.
Get all past received messages for a playwright guid
(e.g. a Frame
).
The internal map used to track these messages is never cleaned, it will keep on growing.
Since we're dealing with (short-lived) tests, that should be fine.
Subscribe to messages for a guid and its descendants.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Lazy launch. Only start the playwright server if actually needed by a test.
Get the initializer data for a channel.
Launch a browser and return its guid
.
Post a message and await the response. We wait for an additional grace period after the timeout that we pass to playwright.
Get all past received messages for a playwright guid
(e.g. a Frame
).
The internal map used to track these messages is never cleaned, it will keep on growing.
Since we're dealing with (short-lived) tests, that should be fine.
Subscribe to messages for a guid and its descendants.