{"action":"created","issue":{"url":"https://api.github.com/repos/angular/protractor/issues/2184","labels_url":"https://api.github.com/repos/angular/protractor/issues/2184/labels{/name}","comments_url":"https://api.github.com/repos/angular/protractor/issues/2184/comments","events_url":"https://api.github.com/repos/angular/protractor/issues/2184/events","html_url":"https://github.com/angular/protractor/issues/2184","id":81508773,"number":2184,"title":"Detected a page unload event while running the tests in Safari","user":{"login":"spatchamatla","id":4671240,"avatar_url":"https://avatars.githubusercontent.com/u/4671240?v=3","gravatar_id":"","url":"https://api.github.com/users/spatchamatla","html_url":"https://github.com/spatchamatla","followers_url":"https://api.github.com/users/spatchamatla/followers","following_url":"https://api.github.com/users/spatchamatla/following{/other_user}","gists_url":"https://api.github.com/users/spatchamatla/gists{/gist_id}","starred_url":"https://api.github.com/users/spatchamatla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatchamatla/subscriptions","organizations_url":"https://api.github.com/users/spatchamatla/orgs","repos_url":"https://api.github.com/users/spatchamatla/repos","events_url":"https://api.github.com/users/spatchamatla/events{/privacy}","received_events_url":"https://api.github.com/users/spatchamatla/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/protractor/labels/browser:%20safari","name":"browser: safari","color":"bfdadc"},{"url":"https://api.github.com/repos/angular/protractor/labels/needs:%20more%20info","name":"needs: more info","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-27T15:56:06Z","updated_at":"2015-06-16T18:59:37Z","closed_at":null,"body":"protractor v 2.1.0,\r\nSafari v8.0.6, \r\nMAC OS v10.10.3.\r\n\r\nThis issue is similar to  #85 and it still exists. Im seeing the below issue..\r\n```\r\nUnknownError: Detected a page unload event; script execution does not work across page loads. (WARNING: The server did not provide any stacktrace information)\r\nCommand duration or timeout: 1.19 seconds\r\nBuild info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'\r\nSystem info: host: 'mac.local', ip: '<>, os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.3', java.version: '1.8.0_45'\r\nDriver info: org.openqa.selenium.safari.SafariDriver\r\nCapabilities [{browserName=safari, takesScreenshot=true, javascriptEnabled=true, version=8.0.6, cssSelectorsEnabled=true, platform=MAC, secureSsl=true}]\r\nSession ID: null\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:422)\r\n\tat org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)\r\n\tat org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)\r\n\tat org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)\r\n\tat org.openqa.selenium.remote.RemoteWebDriver.executeAsyncScript(RemoteWebDriver.java:526)\r\n\tat sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:497)\r\n\tat org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)\r\n\tat com.sun.proxy.$Proxy1.executeAsyncScript(Unknown Source)\r\n\tat org.openqa.selenium.support.events.EventFiringWebDriver.executeAsyncScript(EventFiringWebDriver.java:225)\r\n\tat org.openqa.selenium.remote.server.handler.ExecuteAsyncScript.call(ExecuteAsyncScript.java:55)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:168)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```"},"comment":{"url":"https://api.github.com/repos/angular/protractor/issues/comments/112529041","html_url":"https://github.com/angular/protractor/issues/2184#issuecomment-112529041","issue_url":"https://api.github.com/repos/angular/protractor/issues/2184","id":112529041,"user":{"login":"spatchamatla","id":4671240,"avatar_url":"https://avatars.githubusercontent.com/u/4671240?v=3","gravatar_id":"","url":"https://api.github.com/users/spatchamatla","html_url":"https://github.com/spatchamatla","followers_url":"https://api.github.com/users/spatchamatla/followers","following_url":"https://api.github.com/users/spatchamatla/following{/other_user}","gists_url":"https://api.github.com/users/spatchamatla/gists{/gist_id}","starred_url":"https://api.github.com/users/spatchamatla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatchamatla/subscriptions","organizations_url":"https://api.github.com/users/spatchamatla/orgs","repos_url":"https://api.github.com/users/spatchamatla/repos","events_url":"https://api.github.com/users/spatchamatla/events{/privacy}","received_events_url":"https://api.github.com/users/spatchamatla/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T18:59:37Z","updated_at":"2015-06-16T18:59:37Z","body":"Protractor 2.1.0\r\nSafari 8.0.6\r\nWebdriver 2.45.0\r\nOSX 10.10.3\r\nSafari extension 2.45.0\r\n\r\nBelow is the mockup code which is able to recreate the above issue.\r\n```\r\ndescribe ('Test Safari with two URLs', function() {\r\n\r\n    var defaultSyncStatus = browser.ignoreSynchronization;\r\n\r\n    beforeEach(function(){\r\n        //for non angular Pages\r\n        browser.ignoreSynchronization = true;\r\n        browser.get('http://www.google.com');\r\n    });\r\n\r\n    afterEach(function() {\r\n    });\r\n\r\n    it('test with apple.com', function () {\r\n        browser.ignoreSynchronization = defaultSyncStatus;\r\n        browser.get('http://www.apple.com');\r\n    });\r\n});\r\n```\r\nWhen it try to navigate to **http://www.apple.com**, it displays only about:blank and it times out with the above ScriptTimeoutError error\r\n\r\nand here is the protractor config as well.\r\n```\r\n\r\nvar browsers = {\r\n    chrome:{\r\n        name:'Chrome',\r\n        browserName:'chrome',\r\n        chromeOptions : {\r\n            args: ['--lang=en','--window-size=1024,768']\r\n        }\r\n    },\r\n    safari:{\r\n        name:'Safari',\r\n        browserName:'safari'\r\n    },\r\n    multiCapabilities: [{\r\n        browserName: 'safari'\r\n    }, {\r\n        browserName: 'chrome',\r\n        chromeOptions : {\r\n            args: ['--lang=en','--window-size=1024,768']\r\n        }\r\n    }]\r\n\r\n}\r\nexports.config = {\r\n    // The address of a running selenium server.\r\n    seleniumAddress: 'http://127.0.0.1:4444/wd/hub',\r\n\r\n    // Spec patterns are relative to the configuration file location passed to protractor\r\n    // They may include glob patterns.\r\n    specs: [\r\n        '<path to scenario>'\r\n    ],\r\n\r\n    //asynchronous time out\r\n    allScriptsTimeout: 30000,\r\n\r\n    onPrepare: function() {\r\n        //increase the script time outs\r\n        browser.manage().timeouts().setScriptTimeout(30000);\r\n    },\r\n\r\n    //For Jasmine framework\r\n    framework: 'jasmine',\r\n\r\n    // Options to be passed to Jasmine-node.\r\n    jasmineNodeOpts: {\r\n        // Use colors in the command line report.\r\n        showColors: true,\r\n        //for StackTrace -- not for Jasmine 2\r\n        includeStackTrace:true,\r\n        //for Verbose -- not for Jasmine 2\r\n        isVerbose:true,\r\n        //for defaultTimeoutInterval\r\n        // max time any test case can run\r\n        defaultTimeoutInterval:300000\r\n        //showTiming: true\r\n    }\r\n};\r\n\r\nif(process.argv[3] === '--chrome'){\r\n    exports.config.capabilities = browsers.chrome;\r\n}else if(process.argv[3] === '--safari'){\r\n    exports.config.capabilities = browsers.safari;\r\n};\r\n```"}}