TaskTimedOut: Task timed-out waiting for element to be visible -Wait timed out after 30025ms

I’m getting tasked timedout exception when trying to use “waitForAndFindElement”.

//log(12.1, 'IndexSpeed');
        $browser.waitForAndFindElement(By.xpath("//ot-i18n[@ot-token='Refresh']"), stepTimeout) //wait for search results
              console.log("clicked Refresh button!");

Hello @amony -

Thanks for posting in the community! The most common reason for this to fail is because the element you are testing is behind another element or has a size of zero. There’s a bit about that in our documentation here:


If neither of those are the issue, please let us know and we can troubleshoot with you.

1 Like