import 'reflect-metadata' ; export const delay = ( ms ) => { return new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ; } ; export function findBy ( selector ) { return ( target , propertyKey ) => { const type = Reflect . getMetadata ( 'design:type' , target , propertyKey ) ; Object . defineProperty ( target , propertyKey , { configurable : true , enumerable : true , get : function ( ) { const promise = ( this as any ) . browser . findElement ( selector ) ; return new type ( promise , selector ) ; } , } ) ; } ; }