Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Frustrated with Random Numbers - Help :(
#1
Solved: 10 Years, 9 Months, 3 Weeks ago
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:
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...
Reply


Messages In This Thread
Frustrated with Random Numbers - Help :( - by Scanditester - 03-31-2009, 08:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Get numbers inside all webelements in webtable and sort them pradeep537 1 2,597 08-04-2016, 01:24 AM
Last Post: Ankur
  Create a random number starting with an alphabet QTPmate 4 3,871 07-31-2014, 09:29 AM
Last Post: QTPmate
  Random Values from Drop-Down profqa 5 5,734 12-06-2013, 09:01 AM
Last Post: basanth27
  GCD of N numbers Venkat`s 1 1,927 10-17-2013, 08:58 PM
Last Post: Parke
  Creating Random String SomeIntern 0 4,790 08-21-2013, 09:10 PM
Last Post: SomeIntern

Forum Jump:


Users browsing this thread: 1 Guest(s)