This event is issued when the application closes.
This event is issued for every window that is created and loaded in Electron. It contains a [Page] that can be used for Playwright automation.
This method returns browser context that can be used for setting up context-wide routing, etc.
Returns the return value of pageFunction
.
If the function passed to the electronApplication.evaluate(pageFunction[, arg]) returns a [Promise], then electronApplication.evaluate(pageFunction[, arg]) would wait for the promise to resolve and return its value.
If the function passed to the
electronApplication.evaluate(pageFunction[, arg])
returns a non-[Serializable] value, then
electronApplication.evaluate(pageFunction[, arg])
returns undefined
. Playwright also supports transferring some additional values that are not serializable by
JSON
: -0
, NaN
, Infinity
, -Infinity
.
Function to be evaluated in the worker context.
Optional argument to pass to pageFunction
.
Returns the return value of pageFunction
.
If the function passed to the electronApplication.evaluate(pageFunction[, arg]) returns a [Promise], then electronApplication.evaluate(pageFunction[, arg]) would wait for the promise to resolve and return its value.
If the function passed to the
electronApplication.evaluate(pageFunction[, arg])
returns a non-[Serializable] value, then
electronApplication.evaluate(pageFunction[, arg])
returns undefined
. Playwright also supports transferring some additional values that are not serializable by
JSON
: -0
, NaN
, Infinity
, -Infinity
.
Function to be evaluated in the worker context.
Optional
arg: anyOptional argument to pass to pageFunction
.
Returns the return value of pageFunction
as a [JSHandle].
The only difference between electronApplication.evaluate(pageFunction[, arg]) and electronApplication.evaluateHandle(pageFunction[, arg]) is that electronApplication.evaluateHandle(pageFunction[, arg]) returns [JSHandle].
If the function passed to the electronApplication.evaluateHandle(pageFunction[, arg]) returns a [Promise], then electronApplication.evaluateHandle(pageFunction[, arg]) would wait for the promise to resolve and return its value.
Function to be evaluated in the worker context.
Optional argument to pass to pageFunction
.
Returns the return value of pageFunction
as a [JSHandle].
The only difference between electronApplication.evaluate(pageFunction[, arg]) and electronApplication.evaluateHandle(pageFunction[, arg]) is that electronApplication.evaluateHandle(pageFunction[, arg]) returns [JSHandle].
If the function passed to the electronApplication.evaluateHandle(pageFunction[, arg]) returns a [Promise], then electronApplication.evaluateHandle(pageFunction[, arg]) would wait for the promise to resolve and return its value.
Function to be evaluated in the worker context.
Optional
arg: anyOptional argument to pass to pageFunction
.
Removes an event listener added by on
or addListener
.
Removes an event listener added by on
or addListener
.
This event is issued when the application closes.
This event is issued for every window that is created and loaded in Electron. It contains a [Page] that can be used for Playwright automation.
Adds an event listener that will be automatically removed after it is triggered once. See addListener
for more information about this event.
Adds an event listener that will be automatically removed after it is triggered once. See addListener
for more information about this event.
This event is issued when the application closes.
This event is issued for every window that is created and loaded in Electron. It contains a [Page] that can be used for Playwright automation.
Removes an event listener added by on
or addListener
.
Removes an event listener added by on
or addListener
.
This event is issued when the application closes.
Optional
optionsOrPredicate: { This event is issued for every window that is created and loaded in Electron. It contains a [Page] that can be used for Playwright automation.
Generated using TypeDoc
Electron application representation. You can use electron.launch([options]) to obtain the application instance. This instance you can control main electron process as well as work with Electron windows: