Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Random Number generator and verification problem
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
In one of the fileds data needs to be between 10-99 and unique.
For now I am trying the following codes

Code:
Dim upperbound, lowerbound
upperbound=99  
lowerbound =10
For i=10 to 99  
CatEventCode=Int((upperbound - lowerbound + 1) * Rnd + lowerbound)  
Next[/b][/color]

[color=#800000][b]If Browser("...").Page("...").WebEdit("...").GetROProperty("value")=CatEventCode Then
    Reporter.ReportEvent micPass,"2 digits value is entered in <CAT/EvenetCode> field",""
    Call Logger(1," 2 digits value is entered in <CAT/EvenetCode> field")
    else
    Reporter.ReportEvent micFail,"2 digits value is not entered in <CAT/EvenetCode> field",""
    Call Logger(2,"2 digits value is not entered in <CAT/EvenetCode> field")
End If


Why does verification fail?

Any other idea for generating 2 digits unique number?
Reply


Messages In This Thread
Random Number generator and verification problem - by jinnah - 09-26-2012, 04:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Create a random number starting with an alphabet QTPmate 4 4,160 07-31-2014, 09:29 AM
Last Post: QTPmate
  Random Values from Drop-Down profqa 5 6,004 12-06-2013, 09:01 AM
Last Post: basanth27
  Creating Random String SomeIntern 0 5,073 08-21-2013, 09:10 PM
Last Post: SomeIntern
  Export verification QAVA 1 2,649 11-05-2012, 10:25 AM
Last Post: sshukla12
  How to choose a random no from list alwarselvam 0 3,165 12-24-2011, 08:28 AM
Last Post: alwarselvam

Forum Jump:


Users browsing this thread: 1 Guest(s)