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....



Hi Friends, I am facing some issues with If,else condition,i.e. i am working on some web ..

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

Post New Answer

More VB Script Interview Questions

what do you mean .ota mobile format

0 Answers  


How can you create an object in vbscript?

0 Answers  


write script to open Gmail.com, and to write script for entering username and password and show whether the result as pass or fail

2 Answers   Thomson Reuters,


Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..

0 Answers   Amazon,


What is Procedure or Subroutine in VB Script?

0 Answers  






how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me

0 Answers  


We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

0 Answers  


In qtp, how to use XML files for framework. if the XML files are more Efficient than Excel files?

1 Answers  


what is the use of Data base check point ?

3 Answers  


write a vb script to create a folder?

3 Answers  


how to store charecters of HARIBABU Using arrays

4 Answers   Cap Gemini,


can anyone tell me the procedure of interview held in applabs

0 Answers  


Categories