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 |
Mention what is byref and byval parameters in vbscript?
can anyone send me a vb scripts code for clicking on a link and coming back on home page again does the same for many links on a web page.
Which function is used to perform string comparison?
Write a VB Script to count blank Lines in a notepad
compare the string without using stringcomp function?
How can we return a value from User Defined Function ? For Eg. we have 2 functions. In Fun1 i am getting 2 values (a,b) and i am addding those 2 and storing in to another var (c). Now i want to pass that var(c) to another function (fun2). What will be the script?
How to remove the spaces in a string Ex: "this is apple"
write a vb script create 5 folders test1 test2 test3 test4 test5
write a text script to display * as below ********** **** **** *** *** ** ** * * * * ** ** *** *** **** **** **********
Write a program using Java Script / VBscipt that checks if two matrices have identical values in all the elements
How will you get the largest subscript of an array in vbscript?
How to open a file. What is the perpose of true and false mode there?