本文整理汇总了TypeScript中protractor.ElementArrayFinder.count方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ElementArrayFinder.count方法的具体用法?TypeScript ElementArrayFinder.count怎么用?TypeScript ElementArrayFinder.count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor.ElementArrayFinder
的用法示例。
在下文中一共展示了ElementArrayFinder.count方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should add inputs programmatically', () => {
expect(inputs.count()).toBe(2);
buttons.get(1).click();
inputs = element.all(by.css('input'));
expect(inputs.count()).toBe(3);
});
示例2: it
it('should can post a movimiento when logged in and display it on Lista Movimientos', () => {
nuevoMovimientoPage.navigateTo();
nuevoMovimientoPage.createMovimiento('27/03/2017', '20', 'Gasto', 'Compras');
listaMovimientosPage.navigateTo();
const listaMovimientos: ElementArrayFinder = listaMovimientosPage.searchListaMovimientos();
expect(listaMovimientos.count()).toBe(1);
});
示例3: expect
const expectHeroes = (isShown: boolean, ng1HeroCount = 3, statusMessage = 'Ready') => {
// Verify the show/hide button text.
expect(showHideBtn.getText()).toBe(isShown ? 'Hide heroes' : 'Show heroes');
// Verify the `<ng2-heroes>` component.
expect(ng2Heroes.isPresent()).toBe(isShown);
if (isShown) {
expect(ng2HeroesHeader.getText()).toBe('Heroes');
expect(ng2HeroesExtra.getText()).toBe(`Status: ${statusMessage}`);
}
// Verify the `<ng1-hero>` components.
expect(ng1Heroes.count()).toBe(isShown ? ng1HeroCount : 0);
if (isShown) {
ng1Heroes.each(ng1Hero => expect(ng1Hero).toBeAHero());
}
};
示例4: it
it('should delete closed panel', () => {
closeIcons.get(0).click();
expect(closableTabElements.count()).toBe(2);
});
示例5: it
it('should show and hide success messages', () => {
successButton.click();
expect<any>(growlItemContainer.count()).toBe(1);
browser.sleep(4000);
expect<any>(growlItemContainer.count()).toBe(0);
});
示例6:
browser.wait(() => elems.count().then(c => c === count), 5000);
示例7: checkItemCount
public static checkItemCount(elemArrayFinder: ElementArrayFinder, action: string, expectCount: number) {
elemArrayFinder.count().then((count: number) => {
console.log('Number of items after ' + action + ': ' + count);
expect(count).toBe(expectCount);
});
}
示例8:
export const waitForCount = (elementArrayFinder: ElementArrayFinder, expectedCount: number) => () => {
return elementArrayFinder.count().then(actualCount => expectedCount === actualCount);
};