Micro Focus QTP (UFT) Forums
Issue for capturing dropdown list value - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Issue for capturing dropdown list value (/Thread-Issue-for-capturing-dropdown-list-value)



Issue for capturing dropdown list value - kamal262007 - 01-29-2013

Through QTP, How can capture dropdown list value in PORTAL


RE: Issue for capturing dropdown list value - ravi.gajul - 01-31-2013

Please use getRoProperty on the dropdown object
ex:
Code:
val=Browser(..).Page(...).WebList(...).getRoProperty(<property that holds your value>)

or if you are referring to selecting a particular value in the drop down use select method

Code:
Browser(..).Page(...).WebList(...).Select "yourvalue"



RE: Issue for capturing dropdown list value - AnkammaRao - 01-31-2013

Code:
'To Get Only One Value In WebList We Can Use "GetItem"
Browser(..).Page(...).WebList(...).GetItem(1)

'To Get All Values
'To Print  WebList Elements
set B_P_Obj= Browser(" ").Page(" ").WebList(" ")
rc=B_P_Obj.GetROProperty("items count")
For i=1 to rc
    it=B_P_Obj.GetItem(i)
    print(it)

Next