I wrote the below function to check if the element exists in a Drop Down List DDL before selecting. however I am getting an error , pls let me know if you have any idea why it's not working , if any one have a better approach please share.
'@Description will check for the existance of the provided item in a DDL
'@Documentation value to check
Public Function ItemExist(objWebList,itemValue)
numberOfItems = objWebList.Length
For i=0 to numberOfItems-1
If objWebList.GetROProperty("value")= itemValue Then
ItemExist = True
You are trying to use a function when it has not been associated as yet. You can define the function at any place in the test but this line has to be used first before using the associated function....