本文整理汇总了TypeScript中protractor.by.css方法的典型用法代码示例。如果您正苦于以下问题:TypeScript by.css方法的具体用法?TypeScript by.css怎么用?TypeScript by.css使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor.by
的用法示例。
在下文中一共展示了by.css方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: triggerOffsetButton
triggerOffsetButton(): promise.Promise<any> {
return this.triggerAButton(by.css('#offsetButton'));
}
示例2: it
it('should go to nested children', function() {
element(by.css('.e2eChildNavsNested')).click();
});
示例3: getParagraphText
getParagraphText() {
return element(by.css('app-root h1')).getText();
}
示例4: getSettinsPageTitleText
getSettinsPageTitleText(){
return element(by.tagName('page-settings')).element(by.tagName('ion-title')).element(by.css('.toolbar-title')).getText();
}
示例5: getMeetUpCardTitle
getMeetUpCardTitle() {
return element(by.css('mat-card-title')).getText();
}
示例6: it
it('should dissappear when the user clicks cancel button', (() => {
OperationsHelper.click(element(by.id('welcome_exit')));
browser.wait(ExpectedConditions.invisibilityOf(element(by.css('.welcome'))), 5000);
}));
示例7: beforeEach
beforeEach(() => {
browser.get('/core/di/ts/contentChildren/index.html');
button = element(by.css('button'));
result = element(by.css('div'));
});
示例8: beforeEach
beforeEach(() => {
browser.get('/forms/ts/simpleForm/index.html');
inputs = element.all(by.css('input'));
paragraphs = element.all(by.css('p'));
});
示例9: describe
describe('Elements', () => {
const messageInput = element(by.css('input'));
const popupButtons = element.all(by.css('button'));
beforeEach(() => browser.get(''));
describe('popup component', () => {
const popupComponentButton = popupButtons.get(0);
const popupComponent = element(by.css('popup-component'));
const closeButton = popupComponent.element(by.css('button'));
it('should be displayed on button click', () => {
expect(popupComponent.isPresent()).toBe(false);
popupComponentButton.click();
expect(popupComponent.isPresent()).toBe(true);
});
it('should display the specified message', () => {
messageInput.clear();
messageInput.sendKeys('Angular rocks!');
popupComponentButton.click();
expect(popupComponent.getText()).toContain('Popup: Angular rocks!');
});
it('should be closed on "close" button click', () => {
popupComponentButton.click();
expect(popupComponent.isPresent()).toBe(true);
closeButton.click();
expect(popupComponent.isPresent()).toBe(false);
});
});
describe('popup element', () => {
const popupElementButton = popupButtons.get(1);
const popupElement = element(by.css('popup-element'));
const closeButton = popupElement.element(by.css('button'));
it('should be displayed on button click', () => {
expect(popupElement.isPresent()).toBe(false);
popupElementButton.click();
expect(popupElement.isPresent()).toBe(true);
});
it('should display the specified message', () => {
messageInput.clear();
messageInput.sendKeys('Angular rocks!');
popupElementButton.click();
expect(popupElement.getText()).toContain('Popup: Angular rocks!');
});
it('should be closed on "close" button click', () => {
popupElementButton.click();
expect(popupElement.isPresent()).toBe(true);
closeButton.click();
expect(popupElement.isPresent()).toBe(false);
});
});
});
示例10: triggerToTopWithSpeedButton
triggerToTopWithSpeedButton(): promise.Promise<any> {
return this.triggerAButton(by.css('#toTopWithSpeed'));
}