Web.txt

This function library contains functions for Web objects and also contains the registration information required by all add-in function library files. To use the functions in this file, you must also load the Common.txt function library file.

Functions

Method GetCheckedProperty This function returns the checked property of a specified Web object.
Method GetTextProperty Returns the value of a specified description properties for a test object.
GetValueProperty This function returns the value property of a specified Web object.
LaunchBrowser Launches a browser based on the specific parameters.
Output Property This function returns the value of a specified property.
Sync This function supplies a default method that returns immediately. It allows your test to wait while the test object is synchronizing.
VerifyChecked This function verifies if the check status of a Web object matches its expected check status.
VerifyProperty This function checks if the value of a property matches its expected value.
VerifyValue This function checks if the value of a Web object matches its expected value.
VerifyWebEnabled This function verifies if the specified Web object is enabled.

Back to top

GetCheckedProperty Function

Description

This function returns the checked property of a specified Web object.

Syntax

GetCheckedProperty (obj)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

IMPORTANT

This function is registered for the following object: WebCheckBox.

Back to top

GetTextProperty Function

Description

This function returns the text property of a specified Web object.

Syntax

GetTextProperty (obj)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

IMPORTANT

This function is registered for the following object: Link.

Back to top

LaunchBrowser Method

Description

Launches a browser based on the specific parameters.

Syntax

LaunchBrowser Browser, [device_model, device_manufacturer, device_ostype, device_osversion]

Argument

Type

Description

Browser

String

Required. The name of the browser to launch.

Possible values:

  • IE

  • IE64
  • CHROME
  • FIREFOX
  • FIREFOX64
  • FF<VersionNumber>
  • SAFARI
  • EDGE
  • PHANTOMJS
  • CHROME_EMULATOR
  • MOBILE_HPWEB
  • MOBILE_CHROME

  • MOBILE_SAFARI

device_model String

Optional. The model of the selected device containing the browser.

This parameter should not be used when launching browsers on a desktop.

Device names must be identical to those listed in the Device section in the Mobile Center Wizard.

device_manufacturer String

Optional. The manufacturer of the specific device.

This parameter should not be used when launching browsers on a desktop.

device_ostype String

Optional. The operating system running on the specified device.

This parameter should not be used when launching browsers on a desktop.

One of the following:

  • ANDROID
  • IOS

Mandatory if the Browser value is set to MOBILE_HPWEB.

device_osversion String

Optional. The operating system version running on the specified device.

This parameter should not be used when launching browsers on a desktop.

Return Value

None

Back to top

GetValueProperty Function

Description

This function returns the value property of a specified Web object.

Syntax

GetValueProperty (obj)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

IMPORTANT

This function is registered for the following objects: WebEdit, WebFile, WebList, and WebRadioGroup.

Back to top

OutputProperty Function

Description

This function returns the value of a specified property.

Syntax

OutputProperty (obj, PropertyNameThe value of the property.)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

PropertyName

The name of the property.

Return Value

The value of the property.

IMPORTANT

This function is registered for the following objects: Browser, Frame, Image, Link, ViewLink, Page, WebArea, WebButton, WebCheckBox, WebEdit, WebElement, WebFile, WebList, WebRadioGroup, WebTable.

Back to top

Sync Function

Description

This function supplies a default method that returns immediately. It allows your test to wait while the test object is synchronizing.

Syntax

Sync

IMPORTANT

This function is registered for the following object: Frame.

Back to top

VerifyChecked Function

Description

This function verifies if the check status of a Web object matches its expected check status.

Syntax

VerifyChecked (obj, ExpectedChecked)

Parameter

Description

obj

The object name and object type to be checked.

ExpectedChecked

The expected check status for the object.

Return Value

True or False.

IMPORTANT

This function is registered for the following object: WebCheckBox.

Back to top

VerifyProperty Function

Description

This function checks if the value of a property matches its expected value.

Syntax

VerifyProperty (obj, PropertyName, ExpectedValue)

Parameter

Description

obj

The object name and object type of the property to be checked.

PropertyName

The name of the property to be checked.

ExpectedValue

The expected value of the property.

Return Value

True or False.

IMPORTANT

This function is registered for the following objects: Browser, Frame, Image, Link, ViewLink, Page, WebArea, WebButton, WebCheckBox, WebEdit, WebElement, WebFile, WebList, WebRadioGroup, WebTable.

Back to top

VerifyValue Function

Description

This function checks if the value of a Web object matches its expected value.

Syntax

VerifyValue (obj, ExpectedValue)

Parameter

Description

obj

The object name and object type to be checked.

ExpectedValue

The expected value of the object.

Return Value

True or False.

IMPORTANT

This function is registered for the following objects: WebEdit, WebFile, WebList, and WebRadioGroup.

Back to top

VerifyWebEnabled Function

Description

This function verifies if the specified Web object is enabled.

Syntax

VerifyEnabled (obj)

Parameter

Description

obj

The object name and object type of the property to be verified.

Return Value

True if the object is enabled.

IMPORTANT

This function is registered for the following objects: WebButton, WebCheckBox, WebEdit, WebFile, WebList, and WebRadioGroup.

Back to top

See also: