IIEWebDriverManager::ExecuteCommand method

[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]

Executes a WebDriver command passed in as a block of JSON and returns a block of JSON as a result or returns an error.

Syntax


HRESULT ExecuteCommand(
   LPWSTR pszCommand     Command,
   LPWSTR * ppszResponse Response
);

Parameters

Command

A JSON string representing a WebDriverCommand, following the format outlined in the WebDriver Spec. For example:

{
   "command":
   {
    "name": "newSession",
     "parameters": {
      "desiredCapabilities": {},
       "requiredCapabilities": {"-ms-requireWindowFocus":false}
    },
     "sessionId": null
    }
}
Response

A pointer to an LPWSTR that receives the response. For example:

{
  "response":
    {
      "sessionId": "%SESSION_TOKEN%",
      "status": "success",
      "value": null
    }
}

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

See also

IIEWebDriverManager
WebDriver API in Developer Channel
WebDriver Commands

 

 

Show: