Skip to content

Instantly share code, notes, and snippets.

@adamhavel
Created July 8, 2015 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamhavel/a51335b9f3e4e9a23376 to your computer and use it in GitHub Desktop.
Save adamhavel/a51335b9f3e4e9a23376 to your computer and use it in GitHub Desktop.
var scope = angular.element('[ng-switch="gridView"]').scope();
var delButton = document.body.querySelector('#contentAction_delete_myx');
var okButton;
function deleteItems() {
for (var i = 0; i < 10; i++) {
scope.onSelect(i);
};
scope.$apply();
delButton.click();
okButton = document.body.querySelector('#dialogButton_ok_myx');
okButton.click();
setTimeout(function() {
okButton = document.body.querySelector('#dialogButton_ok_myx');
okButton.click();
deleteItems();
}, 5000);
}
deleteItems();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment