Entrepreneur, Blogger, Author

Tuesday, October 6, 2009

On Tuesday, October 06, 2009 by Nishant Verma in ,    No comments
I will be pushing some VBScript functions which will help QTP automation testers. I will be randomly selecting web controls and a problem statement with that. Today’s control is drop down box and I will be writing a function which will read all the values in the drop down.
Function GetAllValuesOfDropDown(BrowserName,PageName, DropDownName)
   If  Browser(BrowserName).Page(PageName).WebList(DropDownName).Exist  Then
        If  Browser(BrowserName).Page(PageName).WebList(DropDownName).GetROProperty("disabled") = False  Then 
       DropDownValues = Browser(BrowserName).Page(PageName).WebList(DropDownName).GetROProperty("all items")
            GetAllValuesOfDropDown= DropDownValues
            GetAllValuesOfDropDown= False
        End If
        GetAllValuesOfDropDown= False
   End If
End Function

This will also help me revise my concepts. :)


Post a Comment

Your comments will be reviewed and then published !

Instagram Feed

Web Analytics