Entrepreneur, Blogger, Author of "Mobile Test Automation with Appium"

On Tuesday, October 06, 2009 by Nishant Verma in ,
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
        else
            GetAllValuesOfDropDown= False
        End If
   else
        GetAllValuesOfDropDown= False
   End If
End Function

This will also help me revise my concepts. :)
Web Analytics