Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Which event is triggered when mouse focus comes out of an element in the vbscript language?

959


Explain about the functionality of vb script?

984


How can you create an object in vbscript?

1089


i need to sort the data using qtp script for this how i need to write a qtp script

3685


HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.

2505


what do you mean .ota mobile format

2485


after medical test,when will be the police verification

2169


I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..

2232


How will you convert a string to upper case string using vbscript?

1010


Mention what is the difference between vbscript and vba?

1054


Mention when to use function procedures and what are its characteristics?

1121


Hi this is Vinoth. I need a help on below mentioned question A combobox contains list of items assume as 5 I have to get each items Individually and I have to Export to datatable. Please help me on this. Thanks

2131


where can i learn VB scripint ?

2098


What is dictionary object in vbscript? Explain?

1185


How to open excel in vb script?

1024