You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
Hello there,
I am using protractor with selenium and jasmin framework.
one of my it() testcase calls a function clearfilters which is last step of that testcase. After that function is done executing the main it() testcase took more than 7 to 10 secs to exit out of that block. But if I skip that function then it() testcase runs normally. Not sure what the issue is. Here I am attaching the video of both with and without calling that function. Below also included the snippet of the code. Can someone let me know whats the issue would be as this function will be used many times while running End to end.
async function clearFilters() {
try {
let filterElement = element.all(by.xpath('//*[contains(@class,"deleteIconColorPrimary")]'));
return filterElement.isPresent().then(async (present) => {
if (present) {
return filterElement.count().then(async function (count) {
for (let i = 0; i < count; i++) {
await filterElement.get(i).click();
await genericWait(EC.visibilityOf(element(by.css('[data-selenium="email_dump_item_0"]'))), 1000).then(async (emailDisplayed)=> {
console.log('emailDisplayed '+emailDisplayed)
})
let countResult = filterElement.then(function (count) {
return count;
})
if (countResult = '0') {
console.log('All filters are removed')
break;
}
}
})
}
return;
})
} catch (error) {
console.log(error)
}
}
});
Run with the function clearfilter
If you notice in the above video, in the console after it prints "all done" message you can see it was waiting for more than 5 secs
Hello there,
I am using protractor with selenium and jasmin framework.
one of my it() testcase calls a function clearfilters which is last step of that testcase. After that function is done executing the main it() testcase took more than 7 to 10 secs to exit out of that block. But if I skip that function then it() testcase runs normally. Not sure what the issue is. Here I am attaching the video of both with and without calling that function. Below also included the snippet of the code. Can someone let me know whats the issue would be as this function will be used many times while running End to end.
the callback function clearfilter
Run with the function clearfilter
If you notice in the above video, in the console after it prints "all done" message you can see it was waiting for more than 5 secs
Run without the function clearfilter
The text was updated successfully, but these errors were encountered: