01-27-2010, 11:37 AM
Hi,
I wanted to pass the name of the webbutton from the datasheet. for this reason iam using the below code:
and i am calling the above function
Call ClickWebButton(Save)-->Save is the name of the Webbutton used as the strName.
The above code is not working
Any help will be really appreciated.
Regards;
Vijay
I wanted to pass the name of the webbutton from the datasheet. for this reason iam using the below code:
Code:
Function ClickWebButton(strName)
If strName = "" Then
Exit Function
End If
Set WbButton = Description.Create()
WbButton("micclass").Value = "WebButton"
WbButton("Index").Value = 1
' ClickImage("name").Value = strName
WbButtonFound = False
Set AllWbButton = Browser("micclass:=browser").page("micclass:=page").ChildObjects(WbButton)
For i = 0 TO AllWbButton.count-1
WBname = AllWbButton(i).GetROProperty("name")
If WBname = strName Then
WbButtonFound = True
strDisable = AllWbButton(i).GetROProperty("disabled")
AllWbButton(i).Click
Exit Function
Exit For
End If
Next
Set WbButtonFound = Nothing
End Function
and i am calling the above function
Call ClickWebButton(Save)-->Save is the name of the Webbutton used as the strName.
The above code is not working
Any help will be really appreciated.
Regards;
Vijay