09-27-2012, 02:18 PM
I see the comparison code by you is fine, it requires a slight modification though.
lets talk abt the above line.
CatEventCode : This the random number generated. This is in integer format.
Browser("...").Page("...").WebEdit("...").GetROProperty("value")= This will return the value in string format.
so if you directly compare the value, result will be fail. You need to do the typecasting.
correct code will be
Regards,
Ankesh
Code:
If Browser("...").Page("...").WebEdit("...").GetROProperty("value")=CatEventCode Then
lets talk abt the above line.
CatEventCode : This the random number generated. This is in integer format.
Browser("...").Page("...").WebEdit("...").GetROProperty("value")= This will return the value in string format.
so if you directly compare the value, result will be fail. You need to do the typecasting.
correct code will be
Code:
strDisplayedValue=Browser("...").Page("...").WebEdit("...").GetROProperty("value") 'get the value
'convert it to integer for comparision
intConvertedValue=Cint(strDisplayedValue)
'now do the comparision
if intConvertedValue=CatEventCode Then
'Pass
Else
'Fail
End IF
Regards,
Ankesh