本文整理汇总了TypeScript中protractor/built/element.ElementArrayFinder.map方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ElementArrayFinder.map方法的具体用法?TypeScript ElementArrayFinder.map怎么用?TypeScript ElementArrayFinder.map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor/built/element.ElementArrayFinder
的用法示例。
在下文中一共展示了ElementArrayFinder.map方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: removeMachine
async removeMachine() {
const addMachines = await this.valuesAddMachines.map(async (element) => {
return await element.getText()
});
await this.removeMachines.click();
//await this.valuesAddMachines.waitForElements(1000);
const newMachines = await this.valuesAddMachines.map(async (element) => {
return await element.getText()
});
let checkedLength = false;
if(addMachines.length > newMachines.length) {
checkedLength = true;
};
return checkedLength;
}
示例2: checkTheAudition
async checkTheAudition(text) {
//await this.valuesAddMachines.waitForElements(1000);
const addMachines = await this.valuesAddMachines.map(async (element) => {
return await element.getText()
});
let trueAddMachines = false;
for(let i = 0; i < addMachines.length; i++) {
if(text == addMachines[i]){
trueAddMachines = true;
break;
};
};
return trueAddMachines;
}
示例3: textArraySortPrice
async textArraySortPrice(asertType) {
let EC = protractor.ExpectedConditions;
await browser.wait(EC.elementToBeClickable($('.active.price')), 2000);
let textArr = [];
textArr = await this.price.map(async (element) => {
return await element.getText()
});
let testSort = true;
for(let i = 0;i < textArr.length-1; i++) {
const aserter = () => {
return asertType == 'lowToHight' ? +textArr[i] > +textArr[i+1] : +textArr[i] < +textArr[i+1]
}
if (aserter()) {
testSort = false
break
};
};
return testSort
}
示例4: filterMark
async filterMark(textMachine) {
await this.inputSortMark.sendKeys(textMachine);
let EC = protractor.ExpectedConditions;
browser.wait(EC.elementToBeSelected($('.btn.btn-defult')), 5000);
const but = await this.buttonFilter.get(0);
await but.click();
browser.wait(EC.elementToBeSelected($('.active.brand')), 5000);
const addMachines = await this.valuesAddMachines.map(async (element) => {
return await element.getText()
});
let endFilter = false;
for(let i = 0; i < addMachines.length; i++) {
if(textMachine == addMachines[i]) {
endFilter = true;
return endFilter;
}
}
}