Given below code will work for the clicking for CRM WebButton .
Public Sub CRM_Click_WebButton(obj_container, str_WebButtonID)
Dim i
Dim j,m
Dim objs
'gets all Links from container
Set objs = obj_container.Object.documentElement.GetElementsByTagName("BUTTON")
'for each object - check if the expected link is found
For j = 0 to objs.length - 1
If Instr (1,objs(j).id,str_WebButtonID,1)>0Then
objs(j).Click
End If
Exit for
Next
End Sub
Public Sub CRM_Click_WebButton(obj_container, str_WebButtonID)
Dim i
Dim j,m
Dim objs
'gets all Links from container
Set objs = obj_container.Object.documentElement.GetElementsByTagName("BUTTON")
'for each object - check if the expected link is found
For j = 0 to objs.length - 1
If Instr (1,objs(j).id,str_WebButtonID,1)>0Then
objs(j).Click
End If
Exit for
Next
End Sub
Thanks a lot for your explanations. It helped me a great deal at work to resolve a problem I faced recently.
ReplyDeleteHi sap testing tools..Thanks for commenting.Glad to know that it found it useful.
ReplyDelete