WebDriver
Object Hierarchy:
Description:
public class WebDriver : Object
Same-process input client for the primary WebView.
prepare
binds the inspector port. This Linux file talks WebKit RemoteInspector. Windows /
Android compile
cdp/WebDriver.vala
as the same class name.
click
/
fill
/
press
live on each platform file.
Example
OLLMwebkit.WebDriver.instance = new OLLMwebkit.WebDriver();
OLLMwebkit.WebDriver.instance.prepare();
yield OLLMwebkit.WebDriver.instance.fill(browser.a11y, browser.web_view, fields);
See also:
OLLMwebkit.Browser
Content:
Properties:
- public string browser_name { get; set; }
Session id sent with StartAutomationSession
. Match WebKit.ApplicationInfo
name.
- protected WebDriverValue incoming_reply { public get; public set; }
- public string session_id { get; set; }
Browsing-context handle from Automation.getBrowsingContexts
. Empty until attach
succeeds.
Creation methods:
Methods:
- public async void attach ()
Connect to the inspector socket and start the Automation target.
Idempotent. Failures are logged; session_id
stays empty.
- public async void click (Widget view, int x, int y) throws Error
Click at viewport coordinates via Automation mouse. Wanders in from a
nearby point, then left-clicks.
- public async void delete_session () throws Error
Drop the browsing-context handle.
- public async void fill (A11y a11y, Widget view, HashMap<string,string> fields) throws Error
Fill by HTML name/id: click at a11y WINDOW coords, then paste.
Clipboard + Ctrl+A / Ctrl+V (not per-character keys). Trailing newline means Return.
- public async void new_session () throws Error
Resolve the browsing-context handle (Automation.getBrowsingContexts
).
- public void prepare () throws Error
Bind a loopback inspector port and set WEBKIT_INSPECTOR_SERVER
before any WebView is created.
- public async void press (A11y a11y, Widget view, int press_id) throws Error
Click a press-ref at a11y WINDOW coords (WebView viewport).
- public async WebDriverValue send (string method, Object parameters) throws Error
Send one Automation inspector command.
- protected void write (string name, Variant parameters)
Signals:
Fields:
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref