mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
75 lines
1.5 KiB
TypeScript
75 lines
1.5 KiB
TypeScript
import { browser, by, element } from 'protractor';
|
|
|
|
export class BasicInputsPage {
|
|
navigateTo() {
|
|
return browser.get('/basic-inputs');
|
|
}
|
|
|
|
getIonicCheckbox() {
|
|
return element(by.id('ionCheckbox'));
|
|
}
|
|
|
|
getCheckboxOutput() {
|
|
return element(by.id('checkboxOutput')).getText();
|
|
}
|
|
|
|
getIonicDatetime() {
|
|
return element(by.id('ionDatetimeInput'));
|
|
}
|
|
|
|
getDatetimeOutput() {
|
|
return element(by.id('datetimeOutput')).getText();
|
|
}
|
|
|
|
getIonicToggle() {
|
|
return element(by.id('ionToggle'));
|
|
}
|
|
|
|
getToggleOutput() {
|
|
return element(by.id('toggleOutput')).getText();
|
|
}
|
|
|
|
getTitleText() {
|
|
return element(by.css('.title')).getText();
|
|
}
|
|
|
|
getIonicTextareaInput() {
|
|
return element(by.id('ionTextareaInput'));
|
|
}
|
|
|
|
getIonicTextareaInputEditable() {
|
|
const parent = this.getIonicTextareaInput();
|
|
return parent.all(by.css('textarea')).first();
|
|
}
|
|
|
|
getTextareaOutput() {
|
|
return element(by.id('textareaOutput')).getText();
|
|
}
|
|
|
|
getIonicTextInput() {
|
|
return element(by.id('ionTextInput'));
|
|
}
|
|
|
|
getIonicTextInputEditable() {
|
|
const parent = this.getIonicTextInput();
|
|
return parent.all(by.css('input')).first();
|
|
}
|
|
|
|
getIonicNumericInput() {
|
|
return element(by.id('ionNumericInput'));
|
|
}
|
|
|
|
getIonicNumericInputEditable() {
|
|
const parent = this.getIonicNumericInput();
|
|
return parent.all(by.css('input')).first();
|
|
}
|
|
|
|
getTextOutput() {
|
|
return element(by.id('textOutput')).getText();
|
|
}
|
|
|
|
getNumericOutputType() {
|
|
return element(by.id('numericOutputType')).getText();
|
|
}
|
|
}
|