How can i close a window by clicking "X" button in test Partner using scripts
By doing just that. If you are recording when you click the x, you will see the code that is generated.
I do not put the code here, because the code that is generated is different, depending on which version of TP you are using.
Also, if you are using TP6 visual test mode, you won't get code at all.
I was wondering if someone could help me out. Im trying to grab the name of the Window("name").Attach, where "name" is set to a string.
Im hoping to validate the string returned (window name) via spreadsheet input.
If anyone could help it would be much appreciated [img]/images/graemlins/confused.gif[/img]
rysta - please do read the forum rules, particularly the rules about thread hijacking. If you have a new subject, start a new thread.
Welcome to SQAForums.
Cheers for that...still finding my way thru this.
My apologies, but thanks for the welcome
If you are using TP 6.0 and Visual Tests, you can attach to an object and select the action method "Close" to close the window.
"I think when you spread the wealth around, it's good for everybody." -- Toledo, Ohio, Oct. 12, 2008
Even if you do not see the cursor moving to the "X" from the application under tests view it is exactly the same thing. The same windows message is created when you type Alt-F4 or click the "X" or do a Window.Close through TestPartner.