import { Expectation } from '@serenity-js/core' ; import { ElementFinder , WebElement } from 'protractor' ; import { ElementFinderExpectation } from './ElementFinderExpectation' ; desc returns { serenity-js see {@link @serenity-js/assertions~Ensure} see {@link @serenity-js/core/lib/screenplay/questions~Check} see Wait export function isActive ( ) { return ElementFinderExpectation . forElementTo ( 'become active' , ( actual ) => actual . getWebElement ( ) . then ( element => element . getDriver ( ) . switchTo ( ) . activeElement ( ) . then ( ( active ) => actual . equals ( active ) ) ) ) ; }