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
GetCheckedProperty | This function returns the checked property of a specified Web object. |
GetTextProperty | Returns the value of the specified description property from the test object description. |
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. |
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.
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.
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:
|
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 Digital Lab 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:
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
The following example launches Firefox on a desktop:.
WebUtil.LaunchBrowser "FIREFOX"
The following example launches the Chrome browser on an Android device.
WebUtil.LaunchBrowser "MOBILE_CHROME", "lT-1", "cube", "ANDROID", "5.1"
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.
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.
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.
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.
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.
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.
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.
See also: