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 Enter Values on the Command promt using VB script
How will you get the exponent of the given number in vbscript?
did any one attended interview in applabs if you had gone through plz tell me the procedure
What is the use of the date function in the vbscript language?
Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.
What is loose binding? Why is it not a good practice to use it?
wht must be the interview question on corinthian information technology solutions incorporated.
How can I write HTML text to the window in VB Script?
How to check the particular window is exist or not with out using check points
Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository
what is extension of the file if its saved from recovery manger to some drive
Write a Fucntion to close all Opened browser expect desired one?