Welcome, Guest. Please login or register.
Login with username, password and session length

 
Advanced search

18470 Posts in 4831 Topics- by 32607 Members - Latest Member: kaizerd
 

AdvancedQTP forums have been nominated as a finalist in ATI’s 2nd annual automation honors awards!

We’d like to thank you for your continued support and participation, and urge you to hurry and vote.

Make you voice count! 


Pages: [1]   Go Down
Print
0 Members and 1 Guest are viewing this topic.
Author Topic: selecting multiple items from the weblist    (Read 166 times)
vijay44
User
*
Offline Offline

Posts: 18


« on: February 06, 2010, 02:29:47 AM »

Hi,

Application type:web
qtp version:10.

i wanted to select multiple items from the weblist.
for eg: i created a variable called n
 n=4
for i=0 to n
browser("browsername").page("pagename").weblist("operatingsystems").Extendselect"#n"
but my code is not working as expected.
i want qtp to do multiple slection till item 4.
that means i want qtp to slect item 1, item 2, item 3 and item 4
similarly if i specify n=5
it should qtp to do multipleselection till item 5.

is there any way that can be achieved.
Any help will be really appreciated.
Regards;
vijay
Logged
Asiq Ahamed
Moderator
Sr. User
*****
Offline Offline

Posts: 498



« Reply #1 on: February 06, 2010, 05:59:16 AM »

Hi Vijay,
       Try the below code,

Code
GeSHi (qtp):
strItemsCount=Browser("name:=QTP Codes").Page("title:=QTP Codes").Weblist("name:=weblist").GetROProperty("items count")-1



For i=0 to strItemsCount

        index="#"&i

Browser("name:=QTP Codes").Page("title:=QTP Codes").Weblist("name:=weblist").ExtendSelect index

Next



 
Created by GeSHI 1.0.7.20
Logged
Pages: [1]   Go Up
Print
Jump to: