If there are 10 notepads opened on desktop. how can we
close a particular 2nd notepad using script

Answers were Sorted based on User's Feedback



If there are 10 notepads opened on desktop. how can we close a particular 2nd notepad using script..

Answer / sri satya

Hi Radha,

If you want to close the second Notepad, you can use the
below script:
Window("Notepad_2").Close

or by using Descriptive Programming you can use:
Window("text:=Untitled - Notepad","Location:=1").close


Here the Location value keeps changing.

Pls try it...

Is This Answer Correct ?    4 Yes 0 No

If there are 10 notepads opened on desktop. how can we close a particular 2nd notepad using script..

Answer / rm

The particular NOTEPAD can be activated using the title
text.

E.g: Window("text:=3-17 defects - Notepad").Activate

Is This Answer Correct ?    1 Yes 2 No

If there are 10 notepads opened on desktop. how can we close a particular 2nd notepad using script..

Answer / girishkumar

CreationTime is best for it

While Browser("CreationTime:=0").Exist
Browser("CreationTime:=0").Close
Wend




http://motevich.blogspot.in/2008/06/qtp-descriptive-programming-browsers.html

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

How to build scripts that access data from external sources?

0 Answers  


What is descriptive Programming in qtp.

5 Answers  


what is memory leakage?

15 Answers   ITC Infotech, Panamax, TIT,


what is ODC and GDC?

0 Answers   Patni,


WHO TAKE DECISION TO RELEASE THE BUILD

2 Answers   IGT,






how to write scripts in QTP?

4 Answers   Ordain Solutions,


In QTP how to interact tool and application build?

2 Answers  


How can we automate Capthca on registration or any contest forms ? Is it possile to Automate Webpages with Falsh using QTP..?

1 Answers  


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

0 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  


Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

0 Answers  


what are the attributes of QTP?

3 Answers  


Categories