Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drop down value to be selected from excel_not yet resolved plz help
#1
Hi iam a fresher in automation field.

I have an web based application in which user gives his details in text boxes and dropdowns.
For automation i have supplied all the details in an excel which are:
Name,Location,State,Pin.
But the State field is a drop down field with some predefiend values.I store those state values in excel tab along with name,location,pin.

My requirement is qtp should select the state mentioned in the excels state field from the dropdown.
Im very much need of this........PPz help.

Thanks in advance.......Smile
Reply
#2
Hi,
Try this:
Code:
Window("Notepad").Dialog("Font").WinComboBox("&Size:").Select datatable(<columnname>,<sheetname>);


Hope this helps u.

Regards,
Sankalp
Reply
#3
Thnks sankalp but dis is not working......im getting an error message saying :cannot identify the specified item of the [state] object.confirm if the item is included in the objects item collection.
Reply
#4
Please share the code that you are using in selecting the values for 'State' field using the datatable values.

Regards,
K
Reply
#5
Hi, Try the below script

Code:
Set ObjExcel = CreateObject("Excel.Application") ObjExcel.Visible = TRUE Set sworkbook = ObjExcel.Workbooks.Open ("Z:\QTPForum.xlsx") Set sworksheet = sworkbook.worksheets("Sheet1") state = sworkbook.Worksheets("Sheet1").Cells(1,1).Value All_Items = Browser(" ").Page(" ").WebList(" ").GetROProperty("all items") Each_Item = Split(All_Items,";") For i = Lbound(Each_Item) to Ubound(Each_Item) val = Each_Item(i) If val = state Then Browser(" ").Page(" ").WebList(" ").Select (state) End If Next
Reply
#6
Hi all...........i imported the datatable value as below and it worked....!
Code:
x = Datatable("CUST_STATE",1) Browser("").Page("").Frame("").WebList("").Select x y = Datatable("STATE",1) Browser("").Page("").Frame("").WebList("").Select y

Thanks for ur help....!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Drop-Downs in excel sheet indianinworld 1 4,107 03-01-2011, 08:40 PM
Last Post: indianinworld
  Drop-down box mahadevan.swamy 5 5,176 11-03-2008, 12:47 PM
Last Post: amilar

Forum Jump:


Users browsing this thread: 1 Guest(s)