Search Posts

Category: bluebird

Unable to find elements from the table using protractor

Unable to locate the element in the table using protractor and bluebird promise concepts HTML page – using angular JS TFL712363160734TFLNo Plea Code used to search and return the prose value : this.searchIndex = function (myurn) { return(()=> { var my_table = element(by.css(“case-list-table tbody tr”)); var td = my_table.element(by.css(“td:first-child”)); element.all(td.each(function (element, index) { element.getText().then(function (text) { console.log(“outer” + text); console.log(index, text); if (text.matches(myurn)) { console.log(“Inner” + text); return promise.props({ index:index}); } }); }); }); }; […]

Controlling flow with nested promises in loop

I’m having trouble controlling the flow of my method using promises: //FIND CHECKED OUT FILES getCheckedOutFiles = function () { console.log(‘Get checked out files’); var d = $q.defer(); // Store final results and pass to then callback var checkedOutFiles = window.x = []; // Promise, returns collection with all sites SiteService.getAllSites() .then(sites => { // For each site get lists then get items matching filter sites.forEach(function (site) { var web = new $pnp.Web(site.url); return web.lists […]