Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading Values from csv file and excel file
#3
Not Solved
Hi-
For Excel:
To load the table at runtime do this:
Datatable.AddSheet "NameYouGiveToARuntimeTable" ***Adds the Runtimetable with the given name
Datatable.ImportSheet "c:\YOURUSERNAMESANDPASSWORDS.xls", 1,"NameYouGiveToARuntimeTable" ****Imports the values of your spreadsheet into QTP at runtime. Be sure that you have a column Name for each Column (Email Address, Password)


To enter the value into the application you'll need either a loop or a conditional statement. QTP will attempt to use every row. So if the login is successful it moves forward, completes the test then reruns it with the second username and password.

A way to enter the data from the runtime datatable is this in a browser. For a windows application I am sure it's very similar:

Code:
Browser("NAME").Page("SomePage").WebEdit("TextBoxName").Set DataTable("Username", "NameYouGiveToARuntimeTable")
Browser("NAME").Page("SomePage").WebEdit("TextBoxName").Set DataTable("Password", "NameYouGiveToARuntimeTable")
Reply


Messages In This Thread
RE: Reading Values from csv file and excel file - by wheelercha - 01-07-2010, 02:06 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  File Chooser on Chrome doesn't work - UFT 15.0.1 Nenna Rosa 1 3,328 10-31-2020, 01:16 PM
Last Post: Ankur
  File Pointers Reset When Using Subroutines zunebuggy 0 743 08-19-2020, 07:45 PM
Last Post: zunebuggy
  Reading Global Sheet's DataTable Value Bhuvana 0 1,479 01-05-2020, 10:03 PM
Last Post: Bhuvana
  How to export the output value of a webedit object to a new excel file. mounika6677 1 1,340 04-14-2019, 05:18 PM
Last Post: mounika6677
  Invalid file error importing xls file Makhado 0 1,197 10-04-2018, 04:33 PM
Last Post: Makhado

Forum Jump:


Users browsing this thread: 1 Guest(s)