1.2 <WebKitAutomationSession>

Class: <WebKitAutomationSession>

It derives from <GObject>.

Automation Session.

WebKitAutomationSession represents an automation session of a WebKitWebContext. When a new session is requested, a WebKitAutomationSession is created and the signal WebKitWebContext::automation-started is emitted with the WebKitAutomationSession as argument. Then, the automation client can request the session to create a new <WebKitWebView> to interact with it. When this happens the signal automation-session:create-web-view is emitted.

Properties

Property: automation-session:id self

The session unique identifier.

Its value is a string, or #f.

It can only be set when the object is made, with #:id.

Procedures

Method: automation-session:get-application-info self ⇒ %return
Method: get-application-info self ⇒ %return

Get the the previously set <WebKitAutomationSession>.

Get the <WebKitAutomationSession> previously set with automation-session:set-application-info.

self

Passed: a <WebKitAutomationSession>.

a <WebKitAutomationSession>

%return

Returned: a <WebKitApplicationInfo>.

the <WebKitAutomationSession> of self, or #f if no one has been set.

Method: automation-session:get-id self ⇒ %return
Method: get-id self ⇒ %return

Get the unique identifier of a <WebKitAutomationSession>

self

Passed: a <WebKitAutomationSession>.

a <WebKitAutomationSession>

%return

Returned: a string.

the unique identifier of self

Method: automation-session:set-application-info self info
Method: set-application-info self info

Set the application information to self.

This information will be used by the driver service to match the requested capabilities with the actual application information. If this information is not provided to the session when a new automation session is requested, the creation might fail if the client requested a specific browser name or version. This will not have any effect when called after the automation session has been fully created, so this must be called in the callback of web-context:automation-started signal.

self

Passed: a <WebKitAutomationSession>.

a <WebKitAutomationSession>

info

Passed: a <WebKitApplicationInfo>.

a <WebKitApplicationInfo>

Signals

Signal: automation-session:create-web-view

Connect a handler with (connect object automation-session:create-web-view handler). It is called as (handler self) ⇒ %return.

This signal is emitted when the automation client requests a new browsing context to interact with it. The callback handler should return a <WebKitWebView> created with web-view:is-controlled-by-automation construct property enabled and web-view:automation-presentation-type construct property set if needed.

If the signal is emitted with "tab" detail, the returned <WebKitWebView> should be a new web view added to a new tab of the current browsing context window. If the signal is emitted with "window" detail, the returned <WebKitWebView> should be a new web view added to a new window. When creating a new web view and there’s an active browsing context, the new window or tab shouldn’t be focused.

self

Passed: a <WebKitAutomationSession>.

%return

Returned: a <WebKitWebView>.

a <WebKitWebView> widget.

Signal: automation-session:will-close

Connect a handler with (connect object automation-session:will-close handler). It is called as (handler self).

This signal is emitted when the given automation session is about to finish. It allows clients to perform any cleanup tasks before the session is destroyed.

self

Passed: a <WebKitAutomationSession>.