Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with function call
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,

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
Reply


Messages In This Thread
Problem with function call - by vijay44 - 01-27-2010, 11:37 AM
RE: Problem with function call - by Saket - 01-27-2010, 02:42 PM
RE: Problem with function call - by Anshoo Arora - 01-28-2010, 08:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem With conversion function wajid 3 1,748 10-01-2018, 01:16 PM
Last Post: wajid
  Calling a Function in Function Library when function is defined in an Action jitenderkkr 0 2,973 11-27-2014, 12:53 PM
Last Post: jitenderkkr
  Run Error on Function call in QTP essentials cnujonnala 1 2,322 12-31-2012, 02:38 PM
Last Post: krr
  How can we call a function stored in another test ? akhilsoni776 2 3,794 08-25-2011, 10:47 PM
Last Post: akhilsoni776
  call function from another library y1799 2 5,559 08-19-2010, 06:43 PM
Last Post: y1799

Forum Jump:


Users browsing this thread: 1 Guest(s)