I have 14 itmes in a drop down that are associated with an
account And these items change with different accounts

I want to be able to define it by and index number or any
other id so if I enter 2 in my Global excel sheet it
selects the 2nd item from the drop down - is this possible?

Answers were Sorted based on User's Feedback



I have 14 itmes in a drop down that are associated with an account And these items change with dif..

Answer / puruhsotham

Hi,
It is very much possible to get List Items by passsing
Index from Excel.

Syntax:
Browser("e-OSCAR").Page("e-OSCAR").Frame("Main").WebList
("Listbox").Select 1 (One is Index, else u canpass variable
after importing value to variable )

Is This Answer Correct ?    3 Yes 0 No

I have 14 itmes in a drop down that are associated with an account And these items change with dif..

Answer / azeemuddin

thanks alot

i tried

Browser("e-OSCAR").Page("e-OSCAR").Frame("Main").WebList
("Listbox").Select "#1"

worked grt

Is This Answer Correct ?    1 Yes 0 No

I have 14 itmes in a drop down that are associated with an account And these items change with dif..

Answer / babu

Hi,
Even i have the same problem. I have to get the values from
the weblist which i am not able to. I tried with the script
mentioned above. It is not working for me.
Can anyone help me out to retrieve the data from the
weblist.

Is This Answer Correct ?    1 Yes 0 No

I have 14 itmes in a drop down that are associated with an account And these items change with dif..

Answer / nilanjan saha

Suppose we have total 14 items in the weblist...It means that

x=Browser("XYZ").Page("XYZ").Frame("something").WebList
("Listbox").GetROProperty("items count")

msgbox x ' It should print 14

if you want to print all the values of the weblist then use
for loop for that purpose:

For i=1 to x
msgbox Browser("XYZ").Page("XYZ").Frame("something").WebList
("Listbox").getItem(i)
Next

Hope above code will help...

Regards,
Nilanjan

Is This Answer Correct ?    0 Yes 0 No

I have 14 itmes in a drop down that are associated with an account And these items change with dif..

Answer / jaipalreddy

try with this
option explicit
dim a
a=Browser("name:=Google").page("name:=Google").WebList
("name:=State).GetItem(1)
msgbox(a)

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

How to find if given number is prime or not

1 Answers  


Can you brief the hurdles you faced during Automation testing?

0 Answers  


Which object model ur used in ur project

2 Answers   Cap Gemini,


hai friend's .. my question is a[0]=I a[1]=N a[2]=D LIKE IT GO'S i need output INDIA ,using simple string how will u do? can any one tell really need full..

4 Answers   Mind Tree, Tech Mahindra,


Can I change properties of a test object?

0 Answers  






Tell me the situations where we will use Data Driven?

4 Answers   Ordain Solutions,


What are the challenges u faced in testing with crm domain? How u overcome with?

0 Answers  


If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?

0 Answers   Infosys,


please tell me how to identify the index of the link in the web table .links are not constant.example i want to click the link in the inbox ,search the item and click the partcular mail.(mail links count is not constant)

1 Answers   IBM,


what is the framework followed by ur company in qtp

5 Answers  


How to handle the exceptions using the recovery scenario manager in qtp?

0 Answers  


How to record objects of Windows taskbar

2 Answers   RoboSoft,


Categories