import { browser , by , element , ElementFinder , promise } from 'protractor' ; export class SelectCustomHeadingPage { dropdown = element ( by . id ( 'dropdown' ) ) ; optionsHeading = element ( by . id ( 'options-heading' ) ) ; recentOptionsHeading = element ( by . id ( 'recent-options-heading' ) ) ; checkboxRecentOptions = element ( by . id ( 'recent-options-checkbox' ) ) ; async getPage ( ) { await browser . get ( '#/select/custom-heading' ) ; } getCountry ( index ) { return this . dropdown . $$ ( '.ux-typeahead-all-options li' ) . get ( index ) ; } async clickOnDropdown ( ) { return this . dropdown . click ( ) ; } async clickOnCheckbox ( checkbox ) { await checkbox . $ ( '.ux-checkbox' ) . click ( ) ; } async clickOnCountry ( index ) { return this . getCountry ( index ) . click ( ) ; } }