Saturday, January 16, 2016

Checkbox methods in QTP/UFT with examples

Exist:

Description:  Exist method is used to check whether the object exists in the Open Application or 
Not.

Syntax:  ObjObject.Exist

Return Type:  A Boolean Value

Example:  Browser(“Browser”).Page(“Page”).WebCheckbox(“WebCheckbox”).Exist
---------------------------------------------

Set:

Description:  Set method is used Check/Uncheck the WebCheckbox object value.

Syntax:  ObjObject.Set “ON” OR ObjObject.Set “OFF”

Return Type:  None 

Example:  Browser(“Browser”).Page(“Page”). WebCheckbox(“WebCheckbox”).Set “ON”
                                    OR

          Browser(“Browser”).Page(“Page”). WebCheckbox(“WebCheckbox”).Set “OFF”
--------------------------------------------------

Click:

Description:  Click method is used check/uncheck the WebCheckbox object.

Syntax:  ObjObject.Click

Return Type:  None 

Example:  Browser(“Browser”).Page(“Page”). WebCheckbox (“WebCheckbox”).Click
-----------------------------------------------------

GetROProperty:

Description:  GetROProperty method is used get the current value of the WebCheckbox object.

Syntax:  ObjObject. GetROProperty(Property)

Return Type:  A Variant Value


Example:  Browser(“Browser”).Page(“Page”).WebCheckbox(“WebCheckbox”).GetROProperty(“Name”)

No comments:

Post a Comment