i am entering wrong data or wrong password in a text box and
click on submit button .i am getting a popup window with a
message Please enter the correct password or data .How can i
handle this situation by using QTP.

Answers were Sorted based on User's Feedback



i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / neeraj

Hi Friend

You can go through the "Recovery Scenario" for
this kind of problem. Steps are..in QTP 9.2

Resources-> Recovery Scenario Manager-> click on first image
that is with right side of "Scenarios"(only the enabled
image)text-> read the content and "Next"-> these are the
condition wherever we use Recovery Scenarios select one of
them according wat type of error you have(pop up
window)->"Next"->Click on "Hand" pointer and capture the
popup window and "Next"->"Next"->Select the event you want
to perform "next"->"Next"-> From Recovery operation window
un select the check box and "next"-> "next->"next"-> Write
some description or not(optional)->"next"-"Finish"->"Save"
in your destination.

Now you can use that in your script.

Have a look(softestonline-neeraj043.blogspot.com)

Is This Answer Correct ?    12 Yes 3 No

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / dimple

Hi all,
I have read all the answers.
By using recovery scenario we can just click ok button on
the pop up window.
If we want to enter in to the application ,I think even
recovery wont help it.
If the question is about validation then validate the
username and password by if else statement for Pop up
existence.
If not the data must be correct

Is This Answer Correct ?    5 Yes 1 No

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / less than you

Suppose the same pop window generated while running test
case and while recording it was not generated & values were
properly inserted. What procedure is require please explain
with details?

alkaa.dugaal@gmail.com

Is This Answer Correct ?    2 Yes 2 No

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / bfakruddin

Hello Folks,

Dimple provided nice answer... validation should be done on
password field... when we provide wrong input... popup gets
rise then check it is poped up or not... if it is rised
then pass the test case else... password field accepts
wrong password too...

Code is here,

res=dialog("correct password").getroproperty("enabled")

if (res=true) Then

reporter.reporteven micpass,"password validation done"
...
...

Then

dialog("correct password").webbutton("OK").click

Thanks & regards
Baba Fakruddin.D

Is This Answer Correct ?    1 Yes 1 No

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / vamsi

if you want close all the pop-ups to be closed in QTP, we can use utility objects too
in the above comments they handled pop-ups using recovery scenario as well as through scripting.
but to handle pop-up with utility object write this statement in else block of verification point

Systemutil.CloseDescendantProcessess

if we add this statement the pop-up will be closed automatically by QTP

Is This Answer Correct ?    0 Yes 0 No

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / akshar jain

if there is a pop up message then u just add it to ur
object repository & make the qtp to click on the ok
button..you make this as a function & validate ur login
page as many time as you wantn call ur function

Is This Answer Correct ?    4 Yes 5 No

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / sasmita

Dear Alkaa,
i am just describing the scenario.
1.Open gmail/yahoo or any site.
2.Enter your valid userid and invalid password.
3.We can see a pop-up window with a message "Please enter
the correct password or Password invalid "
even i know the right scenario
4.But i just wanna know how to capture the pop-up window.

Thanks,
Sasmita

Is This Answer Correct ?    1 Yes 2 No

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / zahid

Identify this pop up and buttons on this pop up as an object
and add it in repository. Now use MouseMove function to move
mouse pointer over this pop up and click on "Yes" or "No"
button according to your requirement.

Note:- I am assuming that pop up is a type of window object

Is This Answer Correct ?    1 Yes 2 No

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / saravanaraja

Use the following code:

systemutil.CloseProcessByWndTitle

Is This Answer Correct ?    0 Yes 1 No

i am entering wrong data or wrong password in a text box and click on submit button .i am getting a..

Answer / ajay

When ever u got the popup window you can make it that
ststement as optional.When ever you make it optional if the
popupwindow appears it will take care other wise move to
next step.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More QTP Interview Questions

Can we Script any test case with out having Object repository? or Using Object Repository is a must

3 Answers   Crea,


in real time when we are creating the script by default it is going to save in action object repository or not any way my question is in one of my interviewer said that in real time the default object repository is action object repository and by using quick test plus they are going to merge is it correct i said that by selecting the object repository as shared one in selecting the test>>settings>>resources but she is not convinced what is the correct one

1 Answers   DigiTech, Infotech,


can i change the runtime properties of an object ? How can i check if a parameter exists in database ?

0 Answers  


What is the basic concept of qtp?

0 Answers  


What are the methods of the TextStream object that are used for reading from a text file?

0 Answers  






What are SetToProperty, SetRoProperty, GetToProperty scripting?

4 Answers  


If I want to run more than one test (With different functionality) with in one script, then what i do? plz. explain with any example.

4 Answers  


how many wayes we do the parameterization?

1 Answers  


What are the Features & Benefits of Quick Test Pro (QTP 8.0)?

1 Answers  


Hi Suppose u have complex Test scripts which u vl write first and which u vl execute first

2 Answers   Symphony,


hai,i want to select an option from the right click pop up menu.but the qtp is not recognizing the right click pop up menu as a seperate object.can any one tell me the solution.

4 Answers   HP,


what is descriptive.create()in qtp?

4 Answers   IBM,


Categories