export async function fillInputAction ( selector , text ) { await page . fill ( selector , text ) ; } export async function getInputValueAction ( selector ) { const value = await page . $eval < string , HTMLInputElement > ( selector , el => el . value ) ; return value ; } export function isMobile ( ) { return Boolean ( deviceName ) ; } export async function elementIsVisible ( selector ) { return Boolean ( await page . waitForSelector ( selector ) ) ; } export async function itemsIsVisible ( selector , minNoOfItems ) { const result = await page . $$eval ( selector , ( items , min ) => { return items . length >= min ; } , minNoOfItems ) ; return result ; }