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

what is web application and client server application.is there any difference ?

1 Answers   Wells Fargo,


Hi All, I am 4 yrs experieced in manual testing and new to automation tool QTP. Iam trying to learn it thru online and material i have.I am able to understand but unable to trace out which method or function to be used where necessary in VB Script. How come we know the functions or methods to be used to open a window when clicking on button or so...Pls suggest me.How can i proceed further to apt VB Script.

0 Answers  


can test automation improve test effectiveness?

0 Answers  


What is the disadvantage of smart identification?

3 Answers   Infosys, Sony,


Where to use function or action?

0 Answers  






After fixing the bug, the same bug is raising again and again in new builds what we have to do? That bug is high level bug.

4 Answers   V2 Solutions,


what is the difference between xmlutil and xmlDOM in qtp?

2 Answers  


what is stepin & stepout?

0 Answers  


what is the difference between call to copy action and call to an existing action

5 Answers  


How you will rate urself in QTP in the range of 0 to 5

0 Answers   Genpact,


Which property will you use to check the object state? (Exist)

2 Answers   Symphony,


Hi all, i have installed QTP8.2 in my system. but script is not generating while recording. What is the problem? is any file missing? pls let me know anybody...Thnaks

3 Answers  


Categories