Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Supported_os
SupportIOStrue
SupportAndroidtrue

Info
Note: This command can only be added in the code environment (excpet UFT), and not in SeeTestAutomation

Description

This command can be used to retrieve information (of all parameters listed below) on the last command which was executed.
This command can be also useful while generating reports to an external reports system.

Parameters

The following keys can be found in the map:

  • package - String, Package name of last installed app
  • position - element position (upper left corner of the element)
  • WinTitle - active device the action was made on
  • status - Boolean, indicates if a command succeed or not
  • dtime - the time of a command execution
  • width - width of the element
  • height - height of the element
  • click - click coordinates on click elements
  • img.height - height of the report image
  • img.width - width of the report image
  • screen.height - height of the screen

  • screen.width - width of the screen

  • logLine - string, summarizes the last command 
  • outFile - string, with the path to an image of the report
  • time - time from command to operation
  • bcolor.name - background color name (TEXT Zone only)
  • bcolor - background color value (TEXT Zone only)
  • color - text color value (TEXT Zone only)
  • color.name - text color name (TEXT Zone only)
  • font.size - font size (TEXT Zone only) 
  • step - index of command step in the test
  • found - Boolean, verification of element
  • keys - when command fails to execute
  • errorMessage - string, the error indication
  • exception - string, the exception stack trace (optional)
Info
Note: "TEXT Zone only" means that the key will return values only for objects recognized using OCR (Zone TEXT). Those keys will not work for objects recognized using other identification methods (NATIVE/WEB).

Usage

Example script

Description: On the following Java snippet we will get the status of the isElementFound command

Code Block
languagejava
titleJava Example
linenumberstrue
client.isElementFound("NATIVE", "text=login", 0);
Map <String, Object> map = client.getLastCommandResultMap();
String commandStatus= (String) map.get("status");