My question might be very silly. But i still want to ask and know how it can be done.
Take an example of mercury tour website.
a) If the user selects 2 passengers in "Find a flight" page then 2 additional text boxes( 4 in total), for passenger first name and last name, will be displayed on "Book A Flight" page.
b) Same way, if user selects 3 passengers then 6 text boxes for entering FirstName and LastName will be displayed.
Now user have parameterized this script where he selects 2 passengers in first iteration and say 3 passenger in second iteration.
Since the user does not know how many textboxes will be displayed, how do we handle this situation using DP. Like if there are 4 textboxes in first iteration and 6 in second iteration, so how do we identify these textboxes before entering any value into them. Because number of textboxes displayed depends on number of passengers entered at run-time.
you dont need to lean all the object. I beleive, creating One DP-object with same prop and just checking whether it exists on the page, allows you to accomplish this task. you can enter value in that instance; which can be iterated as many as time the object exist. youneed to have enough test data otherwise you might jsut end up repeating values if the test data ceases, i.e less than number of boxes.