WebKitAutomationSession

WebKitAutomationSession — Automation Session

Functions

Properties

char * id Read / Write / Construct Only

Signals

Types and Values

Object Hierarchy

    GEnum
    ╰── WebKitAutomationBrowsingContextPresentation
    GObject
    ╰── WebKitAutomationSession

Description

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 “create-web-view” is emitted.

Functions

webkit_automation_session_get_id ()

const char *
webkit_automation_session_get_id (WebKitAutomationSession *session);

Get the unique identifier of a WebKitAutomationSession

Parameters

Returns

the unique identifier of session

Since: 2.18


webkit_automation_session_set_application_info ()

void
webkit_automation_session_set_application_info
                               (WebKitAutomationSession *session,
                                WebKitApplicationInfo *info);

Set the application information to session . 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 “automation-started” signal.

Parameters

Since: 2.18


webkit_automation_session_get_application_info ()

WebKitApplicationInfo *
webkit_automation_session_get_application_info
                               (WebKitAutomationSession *session);

Get the WebKitAutomationSession previously set with webkit_automation_session_set_application_info().

Parameters

Returns

the WebKitAutomationSession of session , or NULL if no one has been set.

[transfer none]

Since: 2.18

Types and Values

struct WebKitAutomationSession

struct WebKitAutomationSession;

enum WebKitAutomationBrowsingContextPresentation

Enum values used for determining the automation browsing context presentation.

Members

WEBKIT_AUTOMATION_BROWSING_CONTEXT_PRESENTATION_WINDOW

a window

 

WEBKIT_AUTOMATION_BROWSING_CONTEXT_PRESENTATION_TAB

a tab

 

Since: 2.28

Property Details

The “id” property

  “id”                       char *

The session unique identifier.

Owner: WebKitAutomationSession

Flags: Read / Write / Construct Only

Default value: NULL

Since: 2.18

Signal Details

The “create-web-view” signal

WebKitWebView*
user_function (WebKitAutomationSession *session,
               gpointer                 user_data)

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 “is-controlled-by-automation” construct property enabled and “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.

Parameters

session

a WebKitAutomationSession

 

user_data

user data set when the signal handler was connected.

 

Returns

a WebKitWebView widget.

[transfer none]

Flags: Has Details

Since: 2.18