Exec

Generated:opprotoc –rst-doc
Version:0.50
Status:Draft
Introduced:core 2.4
/**
 * The Opera Exec protocol can be used to control an Opera instance from
 * the outside, and various operations can be initiated. This
 * functionality is mainly useful for QA testing.
 */

service Exec
{
  option version          = "2.0";
  option core_release     = "2.4";

  command Exec(ActionList)                  returns Default            = 1;
  command GetActionInfoList(Default)        returns ActionInfoList     = 2;
  command SetupScreenWatcher(ScreenWatcher) returns Default            = 3;
  event   OnScreenWatcherEvent              returns ScreenWatcherEvent = 4;
}

Commands

Exec

command Exec(ActionList) returns Default = 1;

argument:

message ActionList
{
  /**
   * Executes a series of actions in the opera host,
   * each action consists of a name identifying the
   * action and optionally a value for the action.
   * The value depends on the type of action.
   */
  message Action
  {
    /**
     * The name of the action to execute.
     * This is either a regular Opera action (e.g. "Page Down"),
     * or a special exec-action. Both kinds can be found by
     * calling `GetActionInfoList`. The special cases are
     * prefixed with underscore ("_"), and these require `value`
     * parameter to work, but always ignores `windowID`.
     *
     * The special cases may include:
     *     _keydown | _keyup:
     *         The `value` is either a key-name ("ctrl", "down", etc.)
     *         or a single character ("a", "b", etc.)
     *     _type:
     *         Types the text present in `value`
     *         (a different approach is the "Insert" action)
     *
     * It is currently not possible to figure out which actions
     * take parameters (`value`), and which don't. Optimistically,
     * we have made the `Action` type extendable to include
     * such information later.
     */
    required string name     = 1;
    optional string value    = 2;
    optional uint32 windowID = 3;
  }
  repeated Action actionList = 1;
}

returns:

message Default
{
}

GetActionInfoList

command GetActionInfoList(Default) returns ActionInfoList = 2;

argument:

message Default
{
}

returns:

/**
 * List all valid `Action` `name`s
 */
message ActionInfoList
{
  /**
   * Name of an action, to be used in the `Action` message.
   */
  message ActionInfo
  {
    required string name = 1;
  }
  repeated ActionInfo actionInfoList = 1;
}

SetupScreenWatcher

command SetupScreenWatcher(ScreenWatcher) returns Default = 3;

argument:

message ScreenWatcher
{
  message Area
  {
    required int32 x = 1;
    required int32 y = 2;
    required int32 w = 3;
    required int32 h = 4;
  }
  required uint32 timeOut  = 1;
  required Area   area     = 2;
  repeated string md5List  = 3;
  optional uint32 windowID = 4;
}

returns:

message Default
{
}

Events

OnScreenWatcherEvent

event OnScreenWatcherEvent returns ScreenWatcherEvent = 4;

message:

message ScreenWatcherEvent
{
  required uint32 windowID = 1;
  optional string md5      = 2;
  optional bytes  png      = 3;
}

Table Of Contents

Previous topic

HttpLogger

Next topic

UrlPlayer

This Page