var index = 0;
sc.getCaseNumber().then(function (text) {
console.log("dddddddddddd" + text);
for (var i = 0; i <= caseCount; i++) {
var expectedPendingCases = casenum.summaries[i].urn;
console.log("case " + expectedPendingCases);
if (text == expectedPendingCases) {
console.log("inside--------1 " + text);
expect(text).toEqual(expectedPendingCases);
index = i + 1;
sjpCasesPendingDecisionPage.getSearchCaseNumber(index).then(function (text) {
console.log("inside loop" + text);
});
break;
}
}
});
console.log("Index--------"+index);
return promise.props({
urn: sc.getSearchCaseNumber(index)
aDays: sc.getSearchAgeDays(index),
prosec: sc.getSearchprosecutor(index),
plea: sc.getSearchReadyForDecision(index)
});
我正在尝试将案例编号与expectedPendingCases中的数据进行匹配 获取索引值并使用此索引值查找所有元素并返回promise 然而, 即使索引值发生更改,索引值也默认为0 这个值没有反映出来 return promise.props({ urn:sc.getSearchCaseNumber(index)