diff --git a/test/functional/services/listing_table.ts b/test/functional/services/listing_table.ts index 9a117458c7f76..fa42eb60fa410 100644 --- a/test/functional/services/listing_table.ts +++ b/test/functional/services/listing_table.ts @@ -179,9 +179,12 @@ export function ListingTableProvider({ getService, getPageObjects }: FtrProvider * @param promptBtnTestSubj testSubj locator for Prompt button */ public async clickNewButton(promptBtnTestSubj: string): Promise { - await retry.try(async () => { + await retry.tryForTime(20000, async () => { // newItemButton button is only visible when there are items in the listing table is displayed. - if (await testSubjects.exists('newItemButton')) { + const isnNewItemButtonPresent = await testSubjects.exists('newItemButton', { + timeout: 5000, + }); + if (isnNewItemButtonPresent) { await testSubjects.click('newItemButton'); } else { // no items exist, click createPromptButton to create new dashboard/visualization