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 are the different attribute used with regular expression?

0 Answers  


In my Script Firstly i have to parametrize the data then we import the data from c drive.suppose i have parametrize the Person name and company Name and i have enter one person name and one company name in the excel sheet now we import the sheet and the script is passed i want to ask one thing can we add more than one person name and more than one company name in the excel sheet suppose firstly we create person name "ADDy" and company nmae.'Wipro" and we set the current row in the script for this data and now we want run the script another set of data so how we can run the script with another set of data

2 Answers  


Pls Solve Error(SAP-CRM):- Cannot identify the specified item of the SAPNavigationBar object.Canfirm that the specified item is included in the object's item collection.

1 Answers  


what is test scheduling?

1 Answers  


What is the meaning Work bench?

0 Answers  






Discuss quicktest professional (qtp) environment?

0 Answers  


describe some problem that u had with automation testing tool?

3 Answers  


can anyone tell me how to search a word/line in a document and to paste it in another file? Thanks in advance.

4 Answers  


when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next

1 Answers  


Explain roles and responsibilites of 2yrs Automation qtp engineer.

3 Answers   Oracle,


IN A WEB PAGE THERE IS TWO WEB BUTTON WITH SAME OBJECT PROPERTY AND VALUE, SO HOW I WILL IDENTIFIE OBJECTS INDIVISUALY.

3 Answers  


how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??

0 Answers   ABC,


Categories