|
Re: Properly Close AUT [message #1444808 is a reply to message #1444748] |
Tue, 14 October 2014 15:26 |
Francis BACQUET Messages: 46 Registered: September 2014 |
Member |
|
|
Hello maherzia,
I tested on my application without results:
try {
get-menu "File/Exit" | click
//find a windows unknown
get-window "FalseWindows"
//wait-until-eclipse-is-ready
} -catch {}
Unfortunaly, I got the same error:
Couldn't open ECL session
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
[Updated on: Tue, 14 October 2014 15:58] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Properly Close AUT [message #1446402 is a reply to message #1446183] |
Thu, 16 October 2014 20:04 |
Francis BACQUET Messages: 46 Registered: September 2014 |
Member |
|
|
I found a solution for you if you use windows (if need, I have to be able to adapt on linux).
I created 2 scripts cmd (command line windows), and I put them d:\.
test.cmd
start d:\waitAndClose.cmd /wait 1
waitAndClose.cmd
rem sleep 5 sec
ping 1.1.1.1 -n 1 -w 5000 > nul
rem kill application with his name begin javaw
taskkill /IM javaw*
rem quit the window
exit
and your eclscript:
exec-process "d:\\test.cmd" -timeout 1
You have to adapt the directory.
For the explanation,rcptt starts application with name "javaw.exe" (it can possibly rename?)
The function exec-process starts test.cmd and its stop after 1 sec. Just the time starts other script cmd.
Finaly, waitAndClose, it waits 5 sec, it closes application with name begin "javaw" and itself closes.
If your AUT ask a confirmation to quit, you can add /F (taskkill /F /IM javaw*), this option forces the application to terminate
[Updated on: Fri, 17 October 2014 06:21] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04737 seconds