Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
For Loop
#1
Solved: 10 Years, 9 Months, 2 Weeks ago
I am a QTP beginer, and trying to learn in with a real project. My programming skills are not upto the par.

here is the problem.

have a dialog with three fileds that i am working on

Customer Name, customer TIN, customer TTN number, First two are required. "Customer Button".

First need to enter the data in the fields and hit Add Customer, another set of three fileds open user will enter the differetn entry for a different customer.

I have global sheet of 99 customer names and TIN, but the loop is keep defaulting to the first customer. It appears that cusomer fields is customer(0), cutomer(1) and so on, it seems it is an array.

Need to know how do i loop 99 times and enter in the new custoemr filed every time hit add custoemr button.

My current code is

Code:
Dim i,  customer_name

For i= 1 to 2
Browser("Login").Page("UAR").WebEdit("customers[0].name").Set DataTable("Customer_name", dtGlobalSheet)
Browser("Login").Page("UAR").WebEdit("customers[0].taxIdNumberRaw").Set DataTable("TIN_Number", dtGlobalSheet)
Browser("Login").Page("UAR").WebButton("Add Customer").Click
Next
Reply


Messages In This Thread
For Loop - by munisw - 06-24-2011, 06:12 AM
RE: For Loop - by Skepsis - 06-28-2011, 05:20 PM
RE: For Loop - by tarun - 06-28-2011, 07:46 PM
RE: For Loop - by rajpes - 07-05-2011, 01:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  FOR LOOP shayk1985 1 5,131 12-13-2012, 11:35 AM
Last Post: sams001
  How to exit from a for loop silpavinod 2 9,411 10-17-2012, 12:55 AM
Last Post: agarwl.anurag
  for loop sia sharma 1 3,210 09-13-2012, 11:44 AM
Last Post: ksrikanth2k9
  Help with Loop LJENNE 1 3,067 08-10-2012, 12:32 PM
Last Post: Ankesh
  How to get out of infinite FOR loop... sssidana 3 4,405 07-20-2012, 01:04 AM
Last Post: sree.85

Forum Jump:


Users browsing this thread: 1 Guest(s)