i am new to qtp i do not know how to write script
how to write the code to login if it fails how to able
error messages

Answer Posted / pravati

Browser().page().webedit().set "mailid"
Browser().page().webedit().set "password"
Browser().page().webbutton().click
if
Browser().Page().Link("Home").Click exist
then
msgbox "login pass"
else msgbox "login fail"

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between Recording time object identification and Run time (Execution) time.

1265


what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?

1680


What is the difference between QTP and WinRunner? Why do you choose only QTP for automation among remaing tools like Rational robot and silk test? Write the VBscript for any functionality in your project ? What is the cost of QTP ? If you entered into yahoo mail with your valid user name then you will get FOR EXAMPLE , " welcome to krishna " on the top of inbo page , how can you test it in QTP? What type of testing you can do, when we gave you 5 screens and how can you test that application? What type of framework you are using in your company and explain it?

2052


how will you check how many members visited the website www.infosys.com?

1683


Which scripting language used by quicktest professional (qtp)?

900


Without using gui map editor we can recognize the application in winrunner ?

827


How extensive or customized are the server logging and reporting requirements; are they considered an integral part of the system and do they require testing?

774


whow much strong on VB and C?

1685


can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?

1889


How many types of recording modes in the qtp?

824


Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?

1780


Does any one worked on JIL Emulator , Testing with QTP(automation). Trail Version of QTP is not identifying the child objects of JIL emulator, Can any one help me out ,

1599


Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..

1564


I used child objects to get the no of weblist present in the weblist.now i need to select the items present in each weblist ?How to do so

2462


How QTP support all types of applications (platforms)?

4269