Legacy | Webpage.Element.Info

  • Command: webpage.element

  • Subcommand: info

  • Supported Platforms: Native (legacy), UFT (legacy), Selenium, Appium

    All commands must be executed using the same framework. Sharing the execution ID between different frameworks is not possible. This means that if you work with a Selenium/Appium driver, you need to call the commands using the Selenium/Appium driver (or, in the case of Reporting commands, through the Reporting SDK that works with the driver) and not as part of a UFT test or another framework.

  • Supported OS: Android, iOS

Description

Retrieves the specified property of the element and can insert its value into a defined variable. Use the property parameter to specify the element property to retrieve.

Parameters

Name Value Default Description
deviceId*     The device for this command.
property*

text (Text)

class (Class)

id (Id)

name (Name)

bgColor (Background color)

fgColor (Foreground color)

fontFamily (Font family)

fontSize (Font size)

fontStyle (Font style)

height (Height)

width (Width)

htmlTag (Tag name)

inputType (Input type)

type (Type)

visibility (Visibility)

x (X)

y (Y)

url (URL)

displayed (Displayed)

selected (Selected)

 

The control property to be retrieved.

text - the control text

url - the control url

class - the html class attribute

id - the html id attribute

name - the html name attribute

bgColor - background color

fgColor - foreground color

fontFamily - font family

fontSize - font size

fontStyle - font style

height - element height

htmlTag - the html tag name

inputType - the html input type

type - Node type. A numeric value that categorizes the type of html tag.

visibility - indicates if the control is visible

width - control width

x - x coordinate value in the html page

y - y coordinate value in the html page.

Note: If a property is used that is not listed above, it will be recorded as GetControlProperty.

value*

 

 

The object identifier. By default, an Xpath is generated by the object spy.

Use the By parameter to specify another identification method.

by

xpath (XPath)

cssSelector (CSS Selector)

id (HTML id)

name (HTML name)

className (HTML class)

tagName (HTML tag)

linkText (Text)

partialLinkText (Partial text)

cacheId ()

XPath

Specifies the identification method.

timeout

 

0

The time, in seconds, to wait for the element to appear on the screen or the web page.

variable

   

The variable to receive the webpage property value.

webView

 

1

The index number of the web view in a hybrid application.

framework

appium-1.3.4 (Appium)

perfectoMobile (PerfectoMobile)

PerfectoMobile

The automation framework.

scope

   

A list of XPath expressions representing the iFrames/Frames leading to the element.

pageTimeout

 

30

The time, in seconds, to wait for the application screen or the web page to be loaded.

report

screenshot (Screenshot)

screenshot-on-error (Screenshot on error)

none (None)

Screenshot

The value to display in the report.

Screenshot - display screenshot

Screenshot on error - display screenshots only for actions in error

None - display nothing

It is recommended to reduce the resolution in very long scripts that result in large report files.

report.resolution

high (High)

medium (Medium)

low (Low)

High

The image resolution.

It is recommended to reduce the resolution in very long scripts that result in large report files.

* Mandatory parameter

Request & Response

Copy

Request

https://mycloud.perfectomobile.com/services/executions/john@perfectomobile.com_controller_16-12-07_08_30_54_151?operation=command&securityToken=<your_token>&command=webpage.element&subcommand=info&param.deviceId=570E7512&param.by=id&param.value=okBtn&param.property=bgColor
Copy

JSON response

{
    "reason":"Success",
    "timer.elapsed":"578",
    "returnValue":"Light Blue"    "testGridReportUrl":"https://mycloud.reporting-stg.perfectomobile.com?externalId[0]=john@perfectomobile.com_controller_16-12-07_08_30_54_151",
    "description":"Success",
    "timer.system":"15",
    "completed":"true",
    "flowEndCode":"SUCCEEDED",
    "executionId":"john@perfectomobile.com_controller_16-12-07_08_30_54_151",
    "timer.ux":"563",
    "singleTestReportUrl":"https://mycloud.perfectomobile.com/nexperience/singletest/report/?reportRepositoryKey=PRIVATE:controller/161207/controller_16-12-07_08_30_54_151.xml&ownerId=john@perfectomobile.com&sharingCode=a8d8ba68-ee11-4594-a83a-2eca62034d2c",
    "reportKey":"PRIVATE:controller/161207/controller_16-12-07_08_30_54_151.xml",
    "timer.device":"563"}