I want to build a custom method which will wait for the element and return the element.all(by by)
I used the return type as ElementArrayFinder but it's throwing error as shown in screenshot, can anybody guide what's the problem here? I am using async / await with this method
static async getElements(byEl: any): ElementArrayFinder{
await browser.wait(Util.EC.presenceOf(element(byEl)), 30000, 'Element not found');
return await element.all(byEl);
}