03-06-2012, 06:04 PM
Hi All,
Please help me with this problem.
I have so many check boxes inside a webpage. And the properties of the checkbox is entirely different from the check boxes available in other webpages in the same portal.
Let me show the code I have written for checkbox.
Here I am using html id as the input parameter which is given from an excel. But now what I am facing is the check boxes in the new window does'nt have html id at all. so I have to depend on ordinal identifier.
So can anyone of you can help me out here on how to use ordinal identifer?? Please help!![/align]
Please help me with this problem.
I have so many check boxes inside a webpage. And the properties of the checkbox is entirely different from the check boxes available in other webpages in the same portal.
Let me show the code I have written for checkbox.
Code:
Function SetWebCB(setting_name,setting_value)
Browser("Browser").Page("Page").WebCheckBox("WebCheckBox").SetTOProperty "html id",setting_name
If Browser("Browser").Page("Page").WebCheckBox("WebCheckBox").WebCheckBox("WebCheckBox").Exist Then
If Browser("Browser").Page("Page").WebCheckBox("WebCheckBox").WebCheckBox("WebCheckBox").GetROProperty("disabled") = 0 Then
checked = Browser("Browser").Page("Page").WebCheckBox("WebCheckBox").WebCheckBox("WebCheckBox").GetROProperty("checked")
If setting_value = "ON" Then
If checked = 0 Then
Browser("Browser").Page("Page").WebCheckBox("WebCheckBox").WebCheckBox("WebCheckBox").Set setting_value
SetWebCB = 1
Else
SetWebCB = 0
Call write_result(1, "Object "&setting_name&" is already checked","Comments")
End If
ElseIf setting_value = "OFF" Then
If checked=1 Then
Browser("Browser").Page("Page").WebCheckBox("WebCheckBox").WebCheckBox("WebCheckBox").Set setting_value
SetWebCB = 1
Else
SetWebCB = 0
Call write_result(1, "Object "&setting_name&" is already unchecked","Comments")
End If
Else
SetWebCB = 0
Call write_result(1, "The Parameter should be either ON/OFF","Comments")
End if
Else
SetWebCB = 0
Call write_result(1, "Object "&setting_name&" is disabled","Comments")
End If
Else
SetWebCB = 0
Call write_result(1, "Object "&setting_name&" does not exist","Comments")
End If
End Function
Here I am using html id as the input parameter which is given from an excel. But now what I am facing is the check boxes in the new window does'nt have html id at all. so I have to depend on ordinal identifier.
So can anyone of you can help me out here on how to use ordinal identifer?? Please help!![/align]