本文整理匯總了TypeScript中protractor.by類的典型用法代碼示例。如果您正苦於以下問題:TypeScript by類的具體用法?TypeScript by怎麽用?TypeScript by使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了by類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: deleteComment
deleteComment() {
let scrollToEle = element.all(by.css('.comment-container')).get(0);
let trashIcon = element.all(by.css('.fa.fa-trash-o')).get(0);
browser.actions().mouseMove(scrollToEle).perform().then(() => waitForElementVisibility(trashIcon))
.then(() => element.all(by.css('.fa.fa-trash-o')).get(0).click());
}
示例2: it
it('allows ng1 routes', function () {
browser.get('/index-divide-routes.html#/villain');
expect(element(by.css('h2')).getText()).toBe('Mr. Nice - No More Mr. Nice Guy');
});
示例3: it
it('first li should show hero name with *ngFor', function () {
const allLis = element.all(by.tagName('li'));
expect(allLis.get(0).getText()).toEqual('Mr. Nice');
});
示例4: it
it('"Getting Started" button should route to /help', () => {
element(by.buttonText('Getting Started')).click();
expect(browser.getCurrentUrl()).toContain('/help');
});
示例5: addToHeroName
function addToHeroName(text: string): promise.Promise<void> {
let input = element(by.css('input'));
return input.sendKeys(text);
}