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

scalability testing comes under in which tool?

4 Answers   EpuraTech,


where the check points are stored ?

3 Answers   IBM,


How to Test the mainframe application?

1 Answers   Unisys,


how can i replace any text from the qtp script with some anothere text

1 Answers   Livetek,


In order to select an automation tool for automating ur application, what r the things u need to consider? For eg i will go for automation; 1) When there is a lot of retesting and regression testing. 2) Return on investments. 3) Whether the tool supports the appln. 4)--------------, etc. Pls give me more number of points because my answer did not satisfy the interviewer. Very urgent pls

1 Answers  


how to test power point using QTP 8.2 ? What are different methods to retrieve value from Application during runtime ?

3 Answers   HCL,


What is iteration? How it is related to Test Results in QTP

3 Answers   Virinchi Technologies,


How can I use the value retrieved by OUTPUT VALUE check point as Input for other Actions?

1 Answers   Motorola,


How can I deploye a 'QTP Runtime environment only'

1 Answers   Indexis,


In smart identification, explain about 1. Base filter properties 2. optional filter properties with examples?

2 Answers   TCS,


Can we add the function library directly from scripting in qtp instead of adding from resource tab?

5 Answers   IBM,


Can you import and export data from XLS and how?

4 Answers  


Categories