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













0















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?










share|improve this question


























    0















    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?










    share|improve this question
























      0












      0








      0








      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?










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      Main StarMain Star

      84




      84






















          2 Answers
          2






          active

          oldest

          votes


















          0














          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.






          share|improve this answer























          • 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



















          0














          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()





          share|improve this answer
























            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
            );



            );













            draft saved

            draft discarded


















            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









            0














            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.






            share|improve this answer























            • 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
















            0














            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.






            share|improve this answer























            • 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














            0












            0








            0







            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.






            share|improve this answer













            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.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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


















            • 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














            0














            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()





            share|improve this answer





























              0














              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()





              share|improve this answer



























                0












                0








                0







                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()





                share|improve this answer















                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()






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 days ago









                skomisa

                6,71732247




                6,71732247










                answered 2 days ago









                Jim GrigoryanJim Grigoryan

                30515




                30515



























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                    155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해