Micro Focus QTP (UFT) Forums
Incrementing - 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: Incrementing (/Thread-Incrementing)



Incrementing - jbelkin@gmail.com - 09-20-2011

I need help with incrementing shipment number every time I run script.
Shipment number must be 32 characters exact. Can someone suggest what would work in my case? Thanks.
____________________________________________________________
Code:
Browser("Clinical LIMS v1.4").Page("Shipment List").WebButton("New Shipment").Click
for pr0_u_airbillnumber = JB00000000000000000000000000000010 to JB111111111111111111111111111110 step 1 'old shipment number
Browser("Clinical LIMS v1.4").Page("Add Shipment_2").Frame("maint_iframe").WebEdit("pr0_u_airbillnumber")Set pr0_u_airbillnumber
Browser("Clinical LIMS v1.4").Page("Add Shipment_2").Frame("maint_iframe").WebEdit("pr0_u_airbillnumber").Click
Browser("Clinical LIMS v1.4").Page("Add Shipment_2").WebButton("Save").Click
Browser("Clinical LIMS v1.4").Page("Edit Shipment SH000000000601").Frame("maint_iframe").WebButton("Add").Click
Browser("Clinical LIMS v1.4").Page("Edit Shipment SH000000000601").Frame("maint_iframe").WebEdit("WebEdit").Click
Browser("Clinical LIMS v1.4").Page("Edit Shipment SH000000000601").Frame("maint_iframe").WebEdit("WebEdit").Set DataTable("TRID", dtGlobalSheet)
Browser("Clinical LIMS v1.4").Page("Edit Shipment SH000000000601").WebButton("Save").Click



RE: Incrementing - payal - 09-22-2011

Hi,

u cn retrieve the last used value of shipment number from db and then increment that by 1 everytime u run the script


RE: Incrementing - susangeet02 - 09-30-2011

HI ,
We can use it by test iteration or giving the shipment value in Global sheet . But here in your case i want to know how your shipment value is incremented . Is it incrementing by 1 everytime or Do we have a fixed value ?