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

Difference between object identification and smart identification

2 Answers   Wipro,


Got job with 3 years fake Experience

1 Answers   MNC,


How to connect to oracle(sqlserver) database to QTP

3 Answers   CTS,


What will be the output of the statements below? On error Resume Next Sum 100/0 if Sum= 0 Then msgbox "Pass" else msgbox "Fail" End If

3 Answers   IIT,


What is fragmentation and paging?

0 Answers  






How to connect to data base?

2 Answers  


What is QTP?

3 Answers   Crea,


Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

0 Answers  


Dear Friend, I am New in QTP 10 so can any one tell me how to do QTP testing on WEB APPLICATION while writing VBScript. If Possible then Give Example how to write vbscript in QTP to test WEB Apllication. Vishal Patil

2 Answers  


1. Which function is used to check whether the specified object property achieves the specified value within the specified timeout below anyone is correct 1. Check Property 2. getToproperty 3. output Pls anybody can give the answer.. Thanks in advance...

1 Answers   Navis,


Write a script to customize the test results in PDF and HTML format.

0 Answers   DuPont,


suppose we recording a web based project so for that we are using internet explorer after that if we execute that script in netscape then script will execute or not and one more thing is to exeute the script in any browser what to do

2 Answers   DigiTech,


Categories