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 upload pdf files in qtp?

1 Answers   Syntel, TCS,


How many add-ins comes by default with quicktest professional?

0 Answers  


A web page has two butons with same properties and rotating in clockwise direction. how to click on any of the button?

2 Answers   Virtusa,


What is output value?

3 Answers   Ordain Solutions,


How can we redirect QTP results in to a excel sheet after the execution

3 Answers   SAP Labs, Virtusa,






pls help me with scripting,right from the beginning in QTP

1 Answers  


In qtp what type of data tables are used , name and list out them

1 Answers   Polaris,


i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?

0 Answers  


What are FAST and NORMAL modes in qtp ? Why r these modes intended for ?

3 Answers   IBM,


what function you write to do database testing with the help of qtp?

0 Answers  


I am executing a batchfile.In one script on one Button i have inserted a checkpoint.It is in a loop,my checkpoint is going to fail sometimes.That failed results only I have to log in a file.How it's possible...pls give the solution for this?

6 Answers   Wipro,


Is QTP a compiler or interpreter..? can you we execute a QTP Script file in a another system which does not have QTP installed..??

6 Answers   Virtusa,


Categories