本文整理匯總了TypeScript中protractor.By.repeater方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript By.repeater方法的具體用法?TypeScript By.repeater怎麽用?TypeScript By.repeater使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類protractor.By
的用法示例。
在下文中一共展示了By.repeater方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('the most recent pairs are shown', function () {
const pairElements = element.all(By.repeater('pair in pairAssignments.pairAssignments.pairs'));
const firstPair = pairElements.get(0).all(By.repeater('player in pair'));
expect(firstPair.getText()).toEqual(pluck('name', [player1, player3]));
const secondPair = pairElements.get(1).all(By.repeater('player in pair'));
expect(secondPair.getText()).toEqual(pluck('name', [player5]));
});
示例2: it
it('spinning with two players disabled will only yield one pair and then saving persists the pair', function () {
const playerElements = element.all(By.repeater('selectable in prepare.selectablePlayers'));
expect(playerElements.count()).toEqual(5);
playerElements.get(0).element(By.css('.player-icon')).click();
playerElements.get(2).element(By.css('.player-icon')).click();
playerElements.get(3).element(By.css('.player-icon')).click();
spinButton.click();
const pairs = element.all(By.repeater('pair in pairAssignments.pairAssignments.pairs'));
expect(pairs.count()).toEqual(1);
const players = element.all(By.repeater('player in players'));
expect(players.count()).toEqual(3);
const saveButton = element(By.id('save-button'));
saveButton.click();
browser.wait(async () => false === await saveButton.isDisplayed(), 2000);
expect(pairs.count()).toEqual(1);
expect(players.count()).toEqual(3);
});
示例3:
By.model(0);
By.model(true);
By.model(() => {});
By.model();
By.model('', '');
By.buttonText(0);
By.buttonText(true);
By.buttonText(() => {});
By.buttonText();
By.buttonText('', '');
By.partialButtonText(0);
By.partialButtonText(true);
By.partialButtonText(() => {});
By.partialButtonText();
By.partialButtonText('', '');
By.repeater(0);
By.repeater(true);
By.repeater(() => {});
By.repeater();
By.repeater('', '');
By.exactRepeater(0);
By.exactRepeater(true);
By.exactRepeater(() => {});
By.exactRepeater();
By.exactRepeater('', '');
By.cssContainingText(0);
By.cssContainingText(true);
By.cssContainingText(() => {});
By.cssContainingText();
By.cssContainingText('', 0);
By.cssContainingText(0, 0);
示例4: it
it('will show all players', function () {
browser.setLocation(`/${tribe.id}/player/new`);
const playerElements = element.all(By.repeater('player in players'));
expect(playerElements.getText()).toEqual(pluck('name', players));
});