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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

1454


Hi guys, Our company has started to automate testing and started using the tool QTP.Iam new to QTP and I have the following questions to ask. Would appreciate if anyone could give me a hand on this and explain things in a detailed way. [1] Bugs outside checkpoints: I know that I can easily make the QTP do what I want inside the application. Also, I know that I can insert some checkpoints and that the qtp will notice if those conditions are not met. However, there are bugs and problems that might not be connected to a checkpoint (system crash, database error, losing session/logout etc.); how can I make sure that the QTP will notice such problems as well and flag a test as failed. [2] How to tell the QTP that when a particular statement is "false",it should flag it as, test failed and show in in the test report. In short how to tell the qtp that a test is false from the script so that it shows it in the report For Eg:- if(true) test passed // how to instruct qtp else test failed // how to instruct qtp [3] Test script portability: we are having several environments; If I record a test on User Interface, obviously, the qtp will save the URL; however, how can I make the qtp run the tests so that the url is provided dynamically. Is there a possibility to parameterize the web server.Is this the way to do it.I dont know? [4] Test management: How do I manage the tests? I guess we will be doing it in Quality Center, yet, it’s not perfectly clear to me how we will be doing that. [5] Running scheduled test sets: How do I group tests to a certain test set? How can I make this test set run at a predefined time? [6] Test maintenance: What do we need to do beforehand in order to enable for easy test maintenance, meaning small adjustments in tests? [7] Reports: What kind of reports on test results are available (either QTP or Quality Center)? Thanks in advance and hoping for an answer. Jen

1479


How many types of status are there?

591


Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak

1633


what is the diffrence bw qtp architectute and qtp framework?

1544






Where we can use the analog mode and where we can use the low – level mode?

569


i need code for how to click on particular mail in utlook mail box .its urjent Thank You Balaji

1582


Explain how you can find length of array in qtp?

601


Hi All, How to Compare two strings character by character in QTP

955


Can any suggest me what is exposure testing?

1382


Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks

1415


What are the disadvantages of recording test cases in qtp?

597


What are the different types of functions available in qtp and explain ?

573


How to capture all the data of a webtable, weblist and combolist using QTP?

2857


could any help me please, how to work on visual foxpro application using UFT

1692