Closed InduKrish closed 1 year ago
You've missed await
before loadData().then(async results => {
so the test ends without waiting for .then(
callback to finish. Changing the code like this should fix the issue (please file a new bug and link to this one if it doesn't):
const results = await loadData();
let accrual = JSON.parse(results)
console.log("bidding value is:", accrual)
for (const data of accrual) {
console.log("row no" + data.row)
console.log("row no" + data.originalAccrualDays)
console.log("row no" + data.adjustedAccrualDays)
console.log("row no" + data.adjustmentComment)
await actor.attemptsTo(ClickKebab.on('KebabMenu', 'paged-table-CrewMemberVacationAccruals', data.row));
await actor.asks(ValidatePageTitleContent.toContainText('header-update-CrewMemberVacationAccrualUpdate', 'Update Accrual'))
await actor.asks(Elements.notToBe.enabled(/Original Accrual/));
await actor.asks(Elements.toBe.visible(/Adjusted Accrual/));
await actor.asks(Elements.toBe.visible(/Comment/));
await actor.asks(Elements.to.containText('originalAccruedDays', data.originalAccrualDays));
await actor.asks(Elements.to.containText('adjustedAccruedDays', data.adjustedAccrualDays));
await actor.asks(Elements.to.containText('adjustmentComment', data.adjustmentComment));
await actor.attemptsTo(Click.on('Id', 'button-text-modal-save'));
}
Awesome, Thank you so much.
while reading dynamically created json file inside playwright test and iterate thru json file, seeing an error. TypeError: Cannot perform 'get' on a proxy that has been revoked. Can you please check the below code and clarify what is causing the issue and please recommend if there are any better solutions?