08-07-2012, 04:48 AM
Hi All,
I am trying to select a particular value from a weblist using QTP. The value is identified and highlighted, but it is not getting selected to the weblist
The script is run without any error. In application the weblist still displays the defeault value "Please select". If we expand the weblist, "Access V...$57,689.65" value is highlighted in the list.
Could you please help me with the code so that the weblist displays the highlighted value?
Thank you
I am trying to select a particular value from a weblist using QTP. The value is identified and highlighted, but it is not getting selected to the weblist
Code:
Source_Accnt="Access V" 'TEST DATA
Src_Accnt=Browser("browser").Page("page").WebList("list").GetROProperty("all items")
Src_list=split(Src_Accnt,";")
For i=0 to ubound(Src_list)
Accnt_Source=Src_list(i)
If instr( Accnt_Source,Source_Accnt) Then 'EXPECTED DATA IS "Access V...$57,689.65"
Browser("browser").Page("page").WebList("list").Select Accnt_Source
Exit For
End If
Next
The script is run without any error. In application the weblist still displays the defeault value "Please select". If we expand the weblist, "Access V...$57,689.65" value is highlighted in the list.
Could you please help me with the code so that the weblist displays the highlighted value?
Thank you