can u give one scenario for for PopWindow Exception & write
Code for that?

Answers were Sorted based on User's Feedback



can u give one scenario for for PopWindow Exception & write Code for that?..

Answer / nani

Hi,

The best example for popup window is when ever your login
in gmail then you will receive a pop message box for
remembering password at that time you have to clck any one
of the optin like remember me or not now..

instead of writting code repeatedly for this one..
just create recovery sceneriao and use it.
otherwise just create a function and store it in utility
file then use it anywhere.

eg:

Function LoginPopup.

If Object_Exixt(Browser("name").Page("Name").Dialogbox
("name")) then

ObjClick(Browser("name").Page("name").winbutton
("buttonname"))

End Function.

just u can use this function where you want in the code.

Nani..

Is This Answer Correct ?    2 Yes 0 No

can u give one scenario for for PopWindow Exception & write Code for that?..

Answer / taruna

you can also use optionalstep

OptionalStep.Browser("name").Page("name").winbutton
("buttonname").click

then it willl for sometime and move further if pop up
window appears.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More QTP Interview Questions

1.How to find in which row or column,string "Hyderabad" exist in excel sheet? 2.How to find how many times character "a" repeated in a given string "Koteswararao"

6 Answers   Ness Technologies,


How to find a window is minimized or not

0 Answers  


How does QTP identifies the object in the application?

1 Answers   Crea,


tell me abt a time when u had to go above &beyind the call of duty to get the job done

0 Answers  


I am using environment variable xml to give credenatials for login into unix. Is there any way we cam mask the password in the xml?

0 Answers  






What are the advantages of a Hybrid framework?

0 Answers  


How can we retrieve the links from a web page where links are dynamically changing(for eg take a online shopping website) and then we have to click on all the links present in the webpage and go to the repective pages and again come back to the first page..

2 Answers  


Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.

0 Answers  


I got an error "The"flightres" Dialog was not found in the Object Repository. Check the OR to confirm that the object exists or to find the correct name for the object." while running the following script Set flightres=description.Create() flightres("text").value="Login" flightres("Class Name").value="Dialog" Set agent = description.Create() agent("nativeclass").value="WinEdit" agent("attachedtext").value="Agent Name:" Set pwd = description.Create() pwd("nativeclass").value="WinEdit" pwd("attachedtext").value="Password" Set button = description.Create() button("nativeclass").value="WinButton" button("Text").value="OK" Dialog("flightres").WinEdit("agent").Set "test" Dialog("flightres").WinEdit("pwd").Set "mercury" Dialog("flightres").WinButton("button").Click Please let me know if i made any mistake in the above script...?

4 Answers  


How do u write regular expression for a window name which is changing for each build ? i.e. in first build the window name is : "computer graphics are very ...." . in second build the window name is : "computer graphics can be created" . - Appreciate proper replies

4 Answers   Semantic Space,


There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?

0 Answers  


I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab1"" value=""Save"" type=""button"">", Second button "html id:=btnSave "outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button"">", Third button "html id:=", outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab Fourth button "html id:=btnSave outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button"" 5th button "html id:=", "outerhtml:=<input class=""Button"" onclick=""document.getElementById('a5').click();"" value=""Save"" type=""button"">",

0 Answers  


Categories