03-31-2009, 08:52 PM
Hi,
Am quite new to this QTP and am just wondering how can I generate random numbers and let QTP click on that random number that got generated?
Someone before me used the following to generate the random numbers:
and then he used the following:
My problem is that the link in my case is randomly generated number. How can I tell Mr. QTP to find the random number generated and click it? Aaaah, this is killing me...
Am quite new to this QTP and am just wondering how can I generate random numbers and let QTP click on that random number that got generated?
Someone before me used the following to generate the random numbers:
Code:
Dim uniqueNumber
Randomize
uniqueNumber=Int((1000000)*Rnd)
and then he used the following:
Code:
row=Browser("ad1Domain").Page("ad1Domain_2").WebTable("EntryNewsletterRegistrationAdmin").GetRowWithCellText(CStr(uniqueNumber))
Browser("ad1Domain_2").Page("ad1Domain").Link("DELETE").SetTOProperty "index",row-2
Browser("ad1Domain_2").Page("ad1Domain").Link("DELETE_2").Click
My problem is that the link in my case is randomly generated number. How can I tell Mr. QTP to find the random number generated and click it? Aaaah, this is killing me...