import { by , element } from 'protractor' ; import { ILocation , promise } from 'selenium-webdriver' ; import { AppPage } from './app.po' ; export class RouteScrollPage extends AppPage { getPath ( ) { return '/router' ; } getHead3VerticalPosition ( ) { return this . getVerticalPosition ( by . css ( '#head3' ) ) ; } getHead7VerticalPosition ( ) { return this . getVerticalPosition ( by . css ( '#head7' ) ) ; } getDifferentRouteScrollButtonRouterLink ( ) { return element ( by . css ( '#differentRouteScroll' ) ) . getAttribute ( 'routerLink' ) ; } triggerDifferentRouteScroll ( ) { return this . triggerAButton ( by . css ( '#differentRouteScroll' ) ) ; } getDifferentRouteScrollWithFragmentButtonRouterLink ( ) { return element ( by . css ( '#differentRouteScrollWithFragment' ) ) . getAttribute ( 'routerLink' ) ; } triggerDifferentRouteScrollWithFragment ( ) { return this . triggerAButton ( by . css ( '#differentRouteScrollWithFragment' ) ) ; } getDemoScrollButtonRouterLink ( ) { return element ( by . css ( '#demoScroll2' ) ) . getAttribute ( 'routerLink' ) ; } triggerDemoScroll ( ) { return this . triggerAButton ( by . css ( '#demoScroll2' ) ) ; } triggerRouteScrollType1 ( ) { return this . triggerAButton ( by . css ( '#currentRouteScroll1' ) ) ; } triggerRouteScrollType2 ( ) { return this . triggerAButton ( by . css ( '#currentRouteScroll2' ) ) ; } triggerRouteScrollType3 ( ) { return this . triggerAButton ( by . css ( '#currentRouteScroll3' ) ) ; } triggerRouteScrollType4 ( ) { return this . triggerAButton ( by . css ( '#currentRouteScroll4' ) ) ; } }