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 can we get a textcheckpoint in QTP9.1?

2 Answers   EmTechPro,


Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?

3 Answers  


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

3 Answers   HCL,


How to call .vbs functions in QTP? plz Explain indetail

4 Answers   Wipro,


What are the general steps involved in the data driven framework?

0 Answers  






How can we disable popup blocker? (I think it means when we get a pop up messge(its error) how we wil disable that one with out interrupting normal process)

6 Answers  


How many actions we can create with in a test?

7 Answers  


Explain how to use QTP to check broken links on a page?

0 Answers  


How will you handle the situation when object is not captured during record?

12 Answers   AZTEC,


How to get the column count and column name from the resultset in the database connection program?

6 Answers  


How many ways we can parameterize data in QTP?

6 Answers   Liquid Crystal,


What is the limitation to XML Checkpoints?

4 Answers   CTS,


Categories