Waooo Man! I see I am learning. I don't know how long you will support me in thsi way. I am already in love of this site and ofcourse you!! Ha haa. Yes, I had problem with verification. I used same method you taught me for Reg Ex verification. I did.
-----------------------------------------------------------
------------------------------------------------------------
But I am going to replace these with your new codes.It is more logical and I ve just learned a new thing. Great buddy. Thanks again.
Hi, I am sorry as my reply goes on top of yours. I think I need to reply from Quick Reply section.
So to covert string to Intiger Cint is used. What about Intiger to string? Sorry for dumb question.
Yes bro! I have just changhed my previous codes. IT works fine. Thanks again
Here it is
-----------------------------------------------------------
Code:
upperbound=99
lowerbound =10
CatEventCode=Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
Browser("ClaimCenter_Br").Page("ClaimCenter_Pg").WebEdit("Cat/EvenetCode").Set CatEventCode
CatastrophyEventCode=Browser("ClaimCenter_Br").Page("ClaimCenter_Pg").WebEdit("Cat/EvenetCode").GetROProperty("value")
Set RegEx=CreateObject("VBScript.RegExp")
RegEx.Pattern="[0-9]+"
BllnResult=RegEx.Test(CatastrophyEventCode)
If BllnResult=True 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
Set RegEx=Nothing
But I am going to replace these with your new codes.It is more logical and I ve just learned a new thing. Great buddy. Thanks again.
Hi, I am sorry as my reply goes on top of yours. I think I need to reply from Quick Reply section.
So to covert string to Intiger Cint is used. What about Intiger to string? Sorry for dumb question.
Yes bro! I have just changhed my previous codes. IT works fine. Thanks again
Here it is
Code:
upperbound=99
lowerbound =10
CatEventCode=Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
Browser("ClaimCenter_Br").Page("ClaimCenter_Pg").WebEdit("Cat/EvenetCode").Set CatEventCode
StrCatEventCode=Browser("ClaimCenter_Br").Page("ClaimCenter_Pg").WebEdit("Cat/EvenetCode").GetROProperty("value")
needs to be coverted to Intiger
IntCatEventCode=Cint(StrCatEventCode)
If IntCatEventCode=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