![]() |
adding items issue - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: adding items issue (/Thread-adding-items-issue) |
adding items issue - Andrew.Stockdale - 10-27-2009 Hello Guru's i am using QTP 10. I have done a test where i add items into a catalogue and check whether it is located within the catalogue once completed but when i run the test again it tries to add the same item again so it fails. Is there a way to add different numbers in a sequence for example: QA00001, QA00002, QA00003 and so on?? Thanks in advance for your help Cheers Andy RE: adding items issue - basanth27 - 10-27-2009 Andy - I am not sure if i get what you actually need. It would be of help if you had the code pasted with your post. However if you are looking for a case of sequentially data generation then maybe this peice of code would help, Code: For i = 1 to 10 ' Hoping you need 10 data Again, since i am not very clear with your question this may seem very irrelevant. If yes, please post the code you have been trying. RE: adding items issue - Andrew.Stockdale - 10-27-2009 I'll try to explain another way. I can't put code on here because my company won't allow details of company on here. I have 100 items that i need to test to make sure they have been added to a catalogue that i designed. The starting reference is QA00001 and obviously it will end QA0000100. If i run the test a 100 times it will work but if i try to re-run it again, it will not work because these items are already included in the catalogue. I can't have duplicate numbers for example QA00003 and QA00003. I hope this helps Andy RE: adding items issue - basanth27 - 10-28-2009 Andy, did the random number help you ? Try with it until i get you a solution. |