This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Error by executeAsyncScript: Detected a page unload event; async script execution does not work across page loads #1651
Closed
Description
Hi folk,
i got this error when running the executeAsyncScript():
"Detected a page unload event; async script execution does not work across page loads"
my code:
create: function (contentObj) {
return browser.executeAsyncScript(function(contentObj, callback) {
var api = angular.injector(['module']).get('moduleService');
var aContentObj = new api.Page(contentObj); //return a resource object
console.log('contentObj:' + JSON.stringify(pageContentObj));
aContentObj.$save(pageContentObj, function(createdPage) {
callback(createdPage);
});
}, contentObj);
}
Has any one the same issue by executing asynscript? Any help is very appreciated
Regards,
Emy