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