diff --git a/tests/CrediForm2.spec.ts b/tests/CrediForm2.spec.ts index ad0c19d..8a37892 100644 --- a/tests/CrediForm2.spec.ts +++ b/tests/CrediForm2.spec.ts @@ -16,7 +16,10 @@ test('test', async ({ page }) => { await page.getByText('En mi lugar de trabajo').click(); await page.getByText('En otro lugar').click(); - await page.locator('div').filter({ hasText: /^ProvinciaSeleccione su Provincia$/ }).getByLabel('Provincia').click(); + const provinciaElement = page.locator('div').filter({ hasText: /^ProvinciaSeleccione su Provincia$/ }).getByLabel('Provincia'); + await expect(provinciaElement).toBeVisible(); + await provinciaElement.click(); + await page.getByPlaceholder('Buscar').fill('colon'); await page.getByRole('option', { name: 'COLON' }).click(); await page.getByLabel('Distrito').click();