本文整理匯總了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);
};