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