I'm executing the Protractor test in angular web application.
Test Case:
-
Find elements in the list
-
Loop through every element in the list
-
If element containing needed name
-
Click at the element
Code:
let projectsList = await element.all(by.css(Selectors.projectList));
for (item of projectsList) {
item.getText().then((text) => {
if (text.includes("50_projects_to_tests")) {
console.log(text)
item.clik()
}
}, (err) => console.log(err));
}
Problem:
Test case is straightforward to execute except one thing.
Request about updating information in the project is sending every few second. When the response back from the server I'm loosing selected list of project before.
It's mean that I'm not able to click at the element which I found because this element does not longer exist.
I receiving: StaleElementReferenceError: stale element reference: element is not attached to the page document
Question:
Is it able to block/freeze the DOM while the test is executing?
Any ideas would be appreciable to handle the issue.
Aucun commentaire:
Enregistrer un commentaire