08-05-2010, 04:02 PM
Hi,
Open Gmail login page and click sign-in without entering credentials. Error message will be shown as "Enter your email address.". I want to validate this error message. What is the best way to automate this.
Please dont write oneliner that use regualr expression. Please write the code if regexp is required or not required. I tried the following and it is working. But i dont think it si the better way . If you have a better solution, please do sent it.
Code i used.
<<<<<<<<<<
>>>>>>>
Thanks
krish
Open Gmail login page and click sign-in without entering credentials. Error message will be shown as "Enter your email address.". I want to validate this error message. What is the best way to automate this.
Please dont write oneliner that use regualr expression. Please write the code if regexp is required or not required. I tried the following and it is working. But i dont think it si the better way . If you have a better solution, please do sent it.
Code i used.
<<<<<<<<<<
Code:
Dim ExpectedString, Entirestring
ExpectedString = "Enter your email address."
Entirestring= Browser("Gmail: Email from Google").Page("Sign_In Page").GetROProperty("innertext")
If (InStr(1, Entirestring, ExpectedString,1) >1) Then
msgbox("Text found")
Else
msgbox("Text Not found")
End if
Thanks
krish