import { browser , by , element } from 'protractor' ; export class ToolbarSearchTypeheadPage { search = element ( by . id ( 'search' ) ) ; toolbarInput = this . search . $ ( '[uxToolbarSearchField]' ) ; searchButton = this . search . $ ( '[uxToolbarSearchButton]' ) ; searchClear = this . search . $ ( '.ux-toolbar-search-clear' ) ; searchedFor = element ( by . id ( 'searchedFor' ) ) ; async getPage ( ) { await browser . get ( '#/toolbar-search/toolbar-search-typeahead' ) ; } async isDropdownExpanded ( ) { return this . search . $ ( '.ux-typeahead-all-options' ) . isPresent ( ) ; } async openDropdown ( ) { await this . searchButton . click ( ) ; return this . toolbarInput . click ( ) ; } }