Sukili how to close all windowses of app?How do I efficiently iterate over each entry in a Java Map?How do I call one constructor from another in Java?Fastest way to determine if an integer's square root is an integerHow do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?How do I determine whether an array contains a particular value in Java?How do I convert a String to an int in Java?How do I fix android.os.NetworkOnMainThreadException?Can't start Eclipse - Java was started but returned exit code=13How to install Java 8 on Mac
New brakes for 90s road bike
Are Captain Marvel's powers affected by Thanos' actions in Avengers: Infinity War?
C++ debug of nlohmann json using GDB
Travelling outside the UK without a passport
Is it improper etiquette to ask your opponent what his/her rating is before the game?
Why electric field inside a cavity of a non-conducting sphere not zero?
What will be next at the bottom row and why?
What is the evidence for the "tyranny of the majority problem" in a direct democracy context?
How to create ADT in Haskell?
Why can Carol Danvers change her suit colours in the first place?
If a character has darkvision, can they see through an area of nonmagical darkness filled with lightly obscuring gas?
Symbol used to indicate indivisibility
How much character growth crosses the line into breaking the character
Terse Method to Swap Lowest for Highest?
What was this official D&D 3.5e Lovecraft-flavored rulebook?
How could a planet have erratic days?
The IT department bottlenecks progress. How should I handle this?
Redundant comparison & "if" before assignment
Melting point of aspirin, contradicting sources
Are the IPv6 address space and IPv4 address space completely disjoint?
Is there any references on the tensor product of presentable (1-)categories?
What if a revenant (monster) gains fire resistance?
The probability of Bus A arriving before Bus B
Why is it that I can sometimes guess the next note?
Sukili how to close all windowses of app?
How do I efficiently iterate over each entry in a Java Map?How do I call one constructor from another in Java?Fastest way to determine if an integer's square root is an integerHow do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?How do I determine whether an array contains a particular value in Java?How do I convert a String to an int in Java?How do I fix android.os.NetworkOnMainThreadException?Can't start Eclipse - Java was started but returned exit code=13How to install Java 8 on Mac
How to close all windowses of app after test with using Sikuli? I am using sikulix version 1.1.2, and to close window I can type ALT + F4, and it will close 1 window, but I need to close all exiting windowses of current app, how can I resolve it?
java testing sikuli
add a comment |
How to close all windowses of app after test with using Sikuli? I am using sikulix version 1.1.2, and to close window I can type ALT + F4, and it will close 1 window, but I need to close all exiting windowses of current app, how can I resolve it?
java testing sikuli
add a comment |
How to close all windowses of app after test with using Sikuli? I am using sikulix version 1.1.2, and to close window I can type ALT + F4, and it will close 1 window, but I need to close all exiting windowses of current app, how can I resolve it?
java testing sikuli
How to close all windowses of app after test with using Sikuli? I am using sikulix version 1.1.2, and to close window I can type ALT + F4, and it will close 1 window, but I need to close all exiting windowses of current app, how can I resolve it?
java testing sikuli
java testing sikuli
asked 2 days ago
Main StarMain Star
84
84
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
With:
System.exit(0);
System.exit(0);
The "0" lets whomever called your program know that everything went OK. If, however, you are quitting due to an error, you should System.exit(1);, or with another non-zero number corresponding to the specific error.
It's not woking. The app does not closing.
– Main Star
2 days ago
@MainStar you got any error or just not closing?
– Makusium
2 days ago
I don't have any errors after executing your command, but I my test is faling, and I have an error log, which related to my test logs.
– Main Star
2 days ago
Take a screenshot of the application "X-Button" then do a new Screen and click it.Screen s = new Screen();s.click(c:/user/ImageOfScreenshot.png);If you have any more question write me a mail: Nivisan1234@gmail.com
– Makusium
2 days ago
add a comment |
I think you can start and kill the app directly from Python inside Sikuli.
Here is some code that works with Kandu which you can adapt to Sikuli:
import sys
import os
import datetime
import subprocess
import time
def PlayAndWait(macro, timeout_seconds = 10, var1 = '-', var2 = '-', var3 = '-', path_downloaddir = None, path_autorun_html = None, browser_path = None):
assert os.path.exists(path_downloaddir)
assert os.path.exists(path_autorun_html)
assert os.path.exists(browser_path)
log = 'log_' + datetime.datetime.now().strftime('%m-%d-%Y_%H_%M_%S') + '.txt'
path_log = os.path.join(path_downloaddir, log)
args = r'file:///' + path_autorun_html + '?macro=' + macro + '&cmd_var1=' + var1 + '&cmd_var2=' + var2 + '&cmd_var3=' + var3 + '&closeKantu=0&direct=1&savelog=' + log
proc = subprocess.Popen([browser_path, args])
status_runtime = 0
print("Log File with show up at " + path_log)
while(not os.path.exists(path_log) and status_runtime < timeout_seconds):
print("Waiting for macro to finish, seconds=%d" % status_runtime)
time.sleep(1)
status_runtime = status_runtime + 1
if status_runtime < timeout_seconds:
with open(path_log) as f:
status_text = f.readline()
status_init = 1 if status_text.find('Status=OK') != -1 else -1
else:
status_text = "Macro did not complete withing the time given: %d" % timeout_seconds
status_init = -2
proc.kill()
print(status_text)
sys.exit(status_init)
if __name__ == '__main__':
#PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'F:selenium\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program FilesMozilla Firefoxfirefox.exe')
PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'C:Downloads\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program Files (x86)GoogleChromeApplicationchrome.exe')
First
proc = subprocess.Popen([app_path, args])
and then
proc.kill()
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55278225%2fsukili-how-to-close-all-windowses-of-app%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
With:
System.exit(0);
System.exit(0);
The "0" lets whomever called your program know that everything went OK. If, however, you are quitting due to an error, you should System.exit(1);, or with another non-zero number corresponding to the specific error.
It's not woking. The app does not closing.
– Main Star
2 days ago
@MainStar you got any error or just not closing?
– Makusium
2 days ago
I don't have any errors after executing your command, but I my test is faling, and I have an error log, which related to my test logs.
– Main Star
2 days ago
Take a screenshot of the application "X-Button" then do a new Screen and click it.Screen s = new Screen();s.click(c:/user/ImageOfScreenshot.png);If you have any more question write me a mail: Nivisan1234@gmail.com
– Makusium
2 days ago
add a comment |
With:
System.exit(0);
System.exit(0);
The "0" lets whomever called your program know that everything went OK. If, however, you are quitting due to an error, you should System.exit(1);, or with another non-zero number corresponding to the specific error.
It's not woking. The app does not closing.
– Main Star
2 days ago
@MainStar you got any error or just not closing?
– Makusium
2 days ago
I don't have any errors after executing your command, but I my test is faling, and I have an error log, which related to my test logs.
– Main Star
2 days ago
Take a screenshot of the application "X-Button" then do a new Screen and click it.Screen s = new Screen();s.click(c:/user/ImageOfScreenshot.png);If you have any more question write me a mail: Nivisan1234@gmail.com
– Makusium
2 days ago
add a comment |
With:
System.exit(0);
System.exit(0);
The "0" lets whomever called your program know that everything went OK. If, however, you are quitting due to an error, you should System.exit(1);, or with another non-zero number corresponding to the specific error.
With:
System.exit(0);
System.exit(0);
The "0" lets whomever called your program know that everything went OK. If, however, you are quitting due to an error, you should System.exit(1);, or with another non-zero number corresponding to the specific error.
answered 2 days ago
MakusiumMakusium
379
379
It's not woking. The app does not closing.
– Main Star
2 days ago
@MainStar you got any error or just not closing?
– Makusium
2 days ago
I don't have any errors after executing your command, but I my test is faling, and I have an error log, which related to my test logs.
– Main Star
2 days ago
Take a screenshot of the application "X-Button" then do a new Screen and click it.Screen s = new Screen();s.click(c:/user/ImageOfScreenshot.png);If you have any more question write me a mail: Nivisan1234@gmail.com
– Makusium
2 days ago
add a comment |
It's not woking. The app does not closing.
– Main Star
2 days ago
@MainStar you got any error or just not closing?
– Makusium
2 days ago
I don't have any errors after executing your command, but I my test is faling, and I have an error log, which related to my test logs.
– Main Star
2 days ago
Take a screenshot of the application "X-Button" then do a new Screen and click it.Screen s = new Screen();s.click(c:/user/ImageOfScreenshot.png);If you have any more question write me a mail: Nivisan1234@gmail.com
– Makusium
2 days ago
It's not woking. The app does not closing.
– Main Star
2 days ago
It's not woking. The app does not closing.
– Main Star
2 days ago
@MainStar you got any error or just not closing?
– Makusium
2 days ago
@MainStar you got any error or just not closing?
– Makusium
2 days ago
I don't have any errors after executing your command, but I my test is faling, and I have an error log, which related to my test logs.
– Main Star
2 days ago
I don't have any errors after executing your command, but I my test is faling, and I have an error log, which related to my test logs.
– Main Star
2 days ago
Take a screenshot of the application "X-Button" then do a new Screen and click it.
Screen s = new Screen(); s.click(c:/user/ImageOfScreenshot.png); If you have any more question write me a mail: Nivisan1234@gmail.com– Makusium
2 days ago
Take a screenshot of the application "X-Button" then do a new Screen and click it.
Screen s = new Screen(); s.click(c:/user/ImageOfScreenshot.png); If you have any more question write me a mail: Nivisan1234@gmail.com– Makusium
2 days ago
add a comment |
I think you can start and kill the app directly from Python inside Sikuli.
Here is some code that works with Kandu which you can adapt to Sikuli:
import sys
import os
import datetime
import subprocess
import time
def PlayAndWait(macro, timeout_seconds = 10, var1 = '-', var2 = '-', var3 = '-', path_downloaddir = None, path_autorun_html = None, browser_path = None):
assert os.path.exists(path_downloaddir)
assert os.path.exists(path_autorun_html)
assert os.path.exists(browser_path)
log = 'log_' + datetime.datetime.now().strftime('%m-%d-%Y_%H_%M_%S') + '.txt'
path_log = os.path.join(path_downloaddir, log)
args = r'file:///' + path_autorun_html + '?macro=' + macro + '&cmd_var1=' + var1 + '&cmd_var2=' + var2 + '&cmd_var3=' + var3 + '&closeKantu=0&direct=1&savelog=' + log
proc = subprocess.Popen([browser_path, args])
status_runtime = 0
print("Log File with show up at " + path_log)
while(not os.path.exists(path_log) and status_runtime < timeout_seconds):
print("Waiting for macro to finish, seconds=%d" % status_runtime)
time.sleep(1)
status_runtime = status_runtime + 1
if status_runtime < timeout_seconds:
with open(path_log) as f:
status_text = f.readline()
status_init = 1 if status_text.find('Status=OK') != -1 else -1
else:
status_text = "Macro did not complete withing the time given: %d" % timeout_seconds
status_init = -2
proc.kill()
print(status_text)
sys.exit(status_init)
if __name__ == '__main__':
#PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'F:selenium\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program FilesMozilla Firefoxfirefox.exe')
PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'C:Downloads\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program Files (x86)GoogleChromeApplicationchrome.exe')
First
proc = subprocess.Popen([app_path, args])
and then
proc.kill()
add a comment |
I think you can start and kill the app directly from Python inside Sikuli.
Here is some code that works with Kandu which you can adapt to Sikuli:
import sys
import os
import datetime
import subprocess
import time
def PlayAndWait(macro, timeout_seconds = 10, var1 = '-', var2 = '-', var3 = '-', path_downloaddir = None, path_autorun_html = None, browser_path = None):
assert os.path.exists(path_downloaddir)
assert os.path.exists(path_autorun_html)
assert os.path.exists(browser_path)
log = 'log_' + datetime.datetime.now().strftime('%m-%d-%Y_%H_%M_%S') + '.txt'
path_log = os.path.join(path_downloaddir, log)
args = r'file:///' + path_autorun_html + '?macro=' + macro + '&cmd_var1=' + var1 + '&cmd_var2=' + var2 + '&cmd_var3=' + var3 + '&closeKantu=0&direct=1&savelog=' + log
proc = subprocess.Popen([browser_path, args])
status_runtime = 0
print("Log File with show up at " + path_log)
while(not os.path.exists(path_log) and status_runtime < timeout_seconds):
print("Waiting for macro to finish, seconds=%d" % status_runtime)
time.sleep(1)
status_runtime = status_runtime + 1
if status_runtime < timeout_seconds:
with open(path_log) as f:
status_text = f.readline()
status_init = 1 if status_text.find('Status=OK') != -1 else -1
else:
status_text = "Macro did not complete withing the time given: %d" % timeout_seconds
status_init = -2
proc.kill()
print(status_text)
sys.exit(status_init)
if __name__ == '__main__':
#PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'F:selenium\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program FilesMozilla Firefoxfirefox.exe')
PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'C:Downloads\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program Files (x86)GoogleChromeApplicationchrome.exe')
First
proc = subprocess.Popen([app_path, args])
and then
proc.kill()
add a comment |
I think you can start and kill the app directly from Python inside Sikuli.
Here is some code that works with Kandu which you can adapt to Sikuli:
import sys
import os
import datetime
import subprocess
import time
def PlayAndWait(macro, timeout_seconds = 10, var1 = '-', var2 = '-', var3 = '-', path_downloaddir = None, path_autorun_html = None, browser_path = None):
assert os.path.exists(path_downloaddir)
assert os.path.exists(path_autorun_html)
assert os.path.exists(browser_path)
log = 'log_' + datetime.datetime.now().strftime('%m-%d-%Y_%H_%M_%S') + '.txt'
path_log = os.path.join(path_downloaddir, log)
args = r'file:///' + path_autorun_html + '?macro=' + macro + '&cmd_var1=' + var1 + '&cmd_var2=' + var2 + '&cmd_var3=' + var3 + '&closeKantu=0&direct=1&savelog=' + log
proc = subprocess.Popen([browser_path, args])
status_runtime = 0
print("Log File with show up at " + path_log)
while(not os.path.exists(path_log) and status_runtime < timeout_seconds):
print("Waiting for macro to finish, seconds=%d" % status_runtime)
time.sleep(1)
status_runtime = status_runtime + 1
if status_runtime < timeout_seconds:
with open(path_log) as f:
status_text = f.readline()
status_init = 1 if status_text.find('Status=OK') != -1 else -1
else:
status_text = "Macro did not complete withing the time given: %d" % timeout_seconds
status_init = -2
proc.kill()
print(status_text)
sys.exit(status_init)
if __name__ == '__main__':
#PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'F:selenium\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program FilesMozilla Firefoxfirefox.exe')
PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'C:Downloads\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program Files (x86)GoogleChromeApplicationchrome.exe')
First
proc = subprocess.Popen([app_path, args])
and then
proc.kill()
I think you can start and kill the app directly from Python inside Sikuli.
Here is some code that works with Kandu which you can adapt to Sikuli:
import sys
import os
import datetime
import subprocess
import time
def PlayAndWait(macro, timeout_seconds = 10, var1 = '-', var2 = '-', var3 = '-', path_downloaddir = None, path_autorun_html = None, browser_path = None):
assert os.path.exists(path_downloaddir)
assert os.path.exists(path_autorun_html)
assert os.path.exists(browser_path)
log = 'log_' + datetime.datetime.now().strftime('%m-%d-%Y_%H_%M_%S') + '.txt'
path_log = os.path.join(path_downloaddir, log)
args = r'file:///' + path_autorun_html + '?macro=' + macro + '&cmd_var1=' + var1 + '&cmd_var2=' + var2 + '&cmd_var3=' + var3 + '&closeKantu=0&direct=1&savelog=' + log
proc = subprocess.Popen([browser_path, args])
status_runtime = 0
print("Log File with show up at " + path_log)
while(not os.path.exists(path_log) and status_runtime < timeout_seconds):
print("Waiting for macro to finish, seconds=%d" % status_runtime)
time.sleep(1)
status_runtime = status_runtime + 1
if status_runtime < timeout_seconds:
with open(path_log) as f:
status_text = f.readline()
status_init = 1 if status_text.find('Status=OK') != -1 else -1
else:
status_text = "Macro did not complete withing the time given: %d" % timeout_seconds
status_init = -2
proc.kill()
print(status_text)
sys.exit(status_init)
if __name__ == '__main__':
#PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'F:selenium\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program FilesMozilla Firefoxfirefox.exe')
PlayAndWait('DemoAutofill', timeout_seconds = 35, path_downloaddir = r'C:Downloads\', path_autorun_html = r'F:seleniumcmdlinetest.html', browser_path=r'C:Program Files (x86)GoogleChromeApplicationchrome.exe')
First
proc = subprocess.Popen([app_path, args])
and then
proc.kill()
edited 2 days ago
skomisa
6,71732247
6,71732247
answered 2 days ago
Jim GrigoryanJim Grigoryan
30515
30515
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55278225%2fsukili-how-to-close-all-windowses-of-app%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown