[Sikuli-driver] [Bug 1485975] Re: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated & Test suite stops abruptly
** Changed in: sikuli Status: New => Confirmed -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1485975 Title: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated & Test suite stops abruptly Status in Sikuli: Confirmed Bug description: Below is the error log: I am using java+maven+1.1.0 sikuli version. In my code, before every test case, i start the safari browser, do something & close the browser. When i run the test cases individually, i am facing no issues. But when i run it as a suite, safari is getting terminated & tests are unable to proceed further. Below is the log: [debug] Runner: AppleScript: #!/usr/bin/osascript tell application "System Events" set found to "NotFound" try set found to first item of (processes whose name is "safari") end try end tell if not found is equal to "NotFound" then set windowName to "" try set windowName to name of first window of application (name of found) end try set found to {name of found, «class idux» of found, windowName} end if found returned: *error* /var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_254249466/sikuli-3506921394778364787.script:297:347: execution error: System Events got an error: Can’t get application process "Safari". (-1728) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1485975/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Bug 1485975] Re: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly
Thanks Raiman. I am able to solve it by keeping a slight delay of 2-3 seconds after i quit safari before i re-open it again -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1485975 Title: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly Status in Sikuli: New Bug description: Below is the error log: I am using java+maven+1.1.0 sikuli version. In my code, before every test case, i start the safari browser, do something close the browser. When i run the test cases individually, i am facing no issues. But when i run it as a suite, safari is getting terminated tests are unable to proceed further. Below is the log: [debug] Runner: AppleScript: #!/usr/bin/osascript tell application System Events set found to NotFound try set found to first item of (processes whose name is safari) end try end tell if not found is equal to NotFound then set windowName to try set windowName to name of first window of application (name of found) end try set found to {name of found, «class idux» of found, windowName} end if found returned: *error* /var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_254249466/sikuli-3506921394778364787.script:297:347: execution error: System Events got an error: Can’t get application process Safari. (-1728) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1485975/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Bug 1485975] Re: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly
I made some tests with the latest build on OS X 10.10.5 using Safari and found this as a generic workflow to: - start the browser and open an url in any possible browser situation (not open, open with now window, open with one or more windows) - close the browser after having closed all tabs (so next time on open no tabs will be opened automatically independently from settings) using the latest App features of 1.1.0. I had no problems you have to transcript it to Java ;-) def openURL(browser, img, url = http://sikulix.com;): if not browser.isRunning(): print opening browser.focus() wait(1) if not browser.window(): print new window browser.focus() wait(0.5) type(n, Key.CMD) else: print focusing browser.focus() wait(0.5) if not browser.window(): print new window type(n, Key.CMD) print waiting for window while not browser.window(): wait(1) print acting if not exists(img, 0): type(l, Key.CMD); wait(0.5); paste(url); type(Key.ENTER); wait(img, 5); def closeBrowser(browser): if browser.isRunning(): print closing if browser.window(): browser.focus() wait(0.5) while browser.window(): type(w, Key.CMD); wait(0.5) browser.close() browser = App(Safari) base = base.png closeBrowser(browser) # make sure browser is closed for i in range(5): openURL(browser, base) highlight(-2) closeBrowser(browser) wait(1) I found, that someApp.open() seems to have problems on Mac currently (I will fix that later), so I used someApp.focus() to open the browser instead. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1485975 Title: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly Status in Sikuli: New Bug description: Below is the error log: I am using java+maven+1.1.0 sikuli version. In my code, before every test case, i start the safari browser, do something close the browser. When i run the test cases individually, i am facing no issues. But when i run it as a suite, safari is getting terminated tests are unable to proceed further. Below is the log: [debug] Runner: AppleScript: #!/usr/bin/osascript tell application System Events set found to NotFound try set found to first item of (processes whose name is safari) end try end tell if not found is equal to NotFound then set windowName to try set windowName to name of first window of application (name of found) end try set found to {name of found, «class idux» of found, windowName} end if found returned: *error* /var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_254249466/sikuli-3506921394778364787.script:297:347: execution error: System Events got an error: Can’t get application process Safari. (-1728) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1485975/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Bug 1485975] Re: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly
how do you stop and start Safari? -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1485975 Title: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly Status in Sikuli: New Bug description: Below is the error log: I am using java+maven+1.1.0 sikuli version. In my code, before every test case, i start the safari browser, do something close the browser. When i run the test cases individually, i am facing no issues. But when i run it as a suite, safari is getting terminated tests are unable to proceed further. Below is the log: [debug] Runner: AppleScript: #!/usr/bin/osascript tell application System Events set found to NotFound try set found to first item of (processes whose name is safari) end try end tell if not found is equal to NotFound then set windowName to try set windowName to name of first window of application (name of found) end try set found to {name of found, «class idux» of found, windowName} end if found returned: *error* /var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_254249466/sikuli-3506921394778364787.script:297:347: execution error: System Events got an error: Can’t get application process Safari. (-1728) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1485975/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Bug 1485975] Re: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly
Hi raiman, i used the code from your maven sample. Start the browser: App ff = new App(browser); ff.focus(); if (null == screen.exists(image)) { while (null == ff.window()) { screen.wait(1f); } screen.type(l, Key.CMD); screen.wait(1f); screen.paste(link); screen.type(Key.ENTER); screen.wait(image, waitTime); } But when it comes to stopping the browser, instead of using App.close() method, i am sending cmd+q to quit the app. The reason i am sending cmd+q : If i use App.close(), when i run the safari next time, the safari browser also opens with the previous session tabs, which i do not want. but when i use cmd+q, safari starts fresh a new window gets opened. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1485975 Title: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly Status in Sikuli: New Bug description: Below is the error log: I am using java+maven+1.1.0 sikuli version. In my code, before every test case, i start the safari browser, do something close the browser. When i run the test cases individually, i am facing no issues. But when i run it as a suite, safari is getting terminated tests are unable to proceed further. Below is the log: [debug] Runner: AppleScript: #!/usr/bin/osascript tell application System Events set found to NotFound try set found to first item of (processes whose name is safari) end try end tell if not found is equal to NotFound then set windowName to try set windowName to name of first window of application (name of found) end try set found to {name of found, «class idux» of found, windowName} end if found returned: *error* /var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_254249466/sikuli-3506921394778364787.script:297:347: execution error: System Events got an error: Can’t get application process Safari. (-1728) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1485975/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Bug 1485975] Re: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly
ok, thanks. ... and where do you get the mentioned error? -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1485975 Title: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly Status in Sikuli: New Bug description: Below is the error log: I am using java+maven+1.1.0 sikuli version. In my code, before every test case, i start the safari browser, do something close the browser. When i run the test cases individually, i am facing no issues. But when i run it as a suite, safari is getting terminated tests are unable to proceed further. Below is the log: [debug] Runner: AppleScript: #!/usr/bin/osascript tell application System Events set found to NotFound try set found to first item of (processes whose name is safari) end try end tell if not found is equal to NotFound then set windowName to try set windowName to name of first window of application (name of found) end try set found to {name of found, «class idux» of found, windowName} end if found returned: *error* /var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_254249466/sikuli-3506921394778364787.script:297:347: execution error: System Events got an error: Can’t get application process Safari. (-1728) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1485975/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp
[Sikuli-driver] [Bug 1485975] Re: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly
After Multiple tests run successfully, i.e opening closing safari several times, one of the test fails with this reason all the rest of the tests gets aborted from then on. The debug info is generated at console. -- You received this bug notification because you are a member of Sikuli Drivers, which is subscribed to Sikuli. https://bugs.launchpad.net/bugs/1485975 Title: Mac OS 10.10.5 + Java+maven+1.1.0 sikuli : Safari gets terminated Test suite stops abruptly Status in Sikuli: New Bug description: Below is the error log: I am using java+maven+1.1.0 sikuli version. In my code, before every test case, i start the safari browser, do something close the browser. When i run the test cases individually, i am facing no issues. But when i run it as a suite, safari is getting terminated tests are unable to proceed further. Below is the log: [debug] Runner: AppleScript: #!/usr/bin/osascript tell application System Events set found to NotFound try set found to first item of (processes whose name is safari) end try end tell if not found is equal to NotFound then set windowName to try set windowName to name of first window of application (name of found) end try set found to {name of found, «class idux» of found, windowName} end if found returned: *error* /var/folders/qc/n91t7_111l5580skmd5yp2j4xkn478/T/Sikulix_254249466/sikuli-3506921394778364787.script:297:347: execution error: System Events got an error: Can’t get application process Safari. (-1728) To manage notifications about this bug go to: https://bugs.launchpad.net/sikuli/+bug/1485975/+subscriptions ___ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp