WebKit2.AutomationSession

g GObject.Object GObject.Object WebKit2.AutomationSession WebKit2.AutomationSession GObject.Object->WebKit2.AutomationSession

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_application_info ()

get_id ()

set_application_info (info)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

id

str

r/w/co

Signals

Inherited:

GObject.Object (1)

Name

Short Description

create-web-view

This signal is emitted when the automation client requests a new browsing context to interact with it.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class WebKit2.AutomationSession(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

WebKit2.AutomationSessionClass

Automation Session.

WebKit2.AutomationSession represents an automation session of a WebKit2.WebContext. When a new session is requested, a WebKit2.AutomationSession is created and the signal WebKit2.WebContext ::automation-started is emitted with the WebKit2.AutomationSession as argument. Then, the automation client can request the session to create a new WebKit2.WebView to interact with it. When this happens the signal WebKit2.AutomationSession ::create-web-view is emitted.

New in version 2.18.

get_application_info()
Returns:

the WebKit2.AutomationSession of self, or None if no one has been set.

Return type:

WebKit2.ApplicationInfo

Get the the previously set WebKit2.AutomationSession.

Get the WebKit2.AutomationSession previously set with WebKit2.AutomationSession.set_application_info().

New in version 2.18.

get_id()
Returns:

the unique identifier of self

Return type:

str

Get the unique identifier of a WebKit2.AutomationSession

New in version 2.18.

set_application_info(info)
Parameters:

info (WebKit2.ApplicationInfo) – a WebKit2.ApplicationInfo

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 WebKit2.WebContext ::automation-started signal.

New in version 2.18.

Signal Details

WebKit2.AutomationSession.signals.create_web_view(automation_session)
Signal Name:

create-web-view

Flags:

RUN_LAST, DETAILED

Parameters:

automation_session (WebKit2.AutomationSession) – The object which received the signal

Returns:

a WebKit2.WebView widget.

Return type:

WebKit2.WebView

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

If the signal is emitted with “tab” detail, the returned WebKit2.WebView 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 WebKit2.WebView 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.

New in version 2.18.

Property Details

WebKit2.AutomationSession.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The session unique identifier.

New in version 2.18.