Hi Friends,
I am facing some issues with If,else condition,i.e.
i am working on some web page for ex:gmail page.now if i
want to check if username is incorrect or already exist,i
want to display error message in my test report,for this i
am using a simple code first,i.e.
If Browser("Gmail: Email from Google").Page("Gmail: Email
from Google").WebEdit("Email").Set "Shekhar.g"= true Then
Msgbox ("Username Does not Exist!")
Else
msgbox ("Welcome !")
End If
But still i am getting a syntax error
If Browser("Gmail: Email from Google").Page("Gmail: Email
from Google").WebEdit("Email").Set "shekhar.g"= true Then
Msgbox ("Username Does not Exist!")
Else
msgbox ("Welcome !")
End If
I don't feel any thing wrong in this syntax but i don't
understand why it shows such error,i am confused what went
wrong,please help me out & do the favor,thanks a lot....
Answer / rahul dwivedi
object.set property does not return any value..
you are checking for the set property as true which is not
possible..
instead of that check for the message that is being
notified after creating the gmail account..
if message is that user already exists then show error
otherwise not..
for more info visit http://qtp-beginners.blogspot.com/ and
post comment for this..
| Is This Answer Correct ? | 2 Yes | 0 No |
how to add the shared repository file to the script file while running the script manuall
Does VB/Win make standalone .EXE files?
write a vb script to display apple that is 1st a should be displayed then ap then app then appl then apple
Give me sm ideas to write Vbscripts abt protocol testing abilash700@gmail.com.
How to open excel in vb script?
how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me
How to write VB script for login module?
How do you create a recordset object in VBScript?
Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?
Mention how to create a cookie using vbscript?
How to generate 3 digit random number?
What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?