fix: wait for dropdown to appear before clicking

This commit is contained in:
Aravinth Manivannan 2024-01-10 19:03:41 +05:30
parent 2f699f9fe8
commit 1adc85f826
Signed by: realaravinth
GPG key ID: F8F50389936984FF

View file

@ -41,6 +41,7 @@ export default class User {
let dropdown = page.locator("div.dropdown:nth-child(4)"); let dropdown = page.locator("div.dropdown:nth-child(4)");
await dropdown.click(); await dropdown.click();
// await dropdown.getByRole("link", { name: "Sign Out" }).click(); // await dropdown.getByRole("link", { name: "Sign Out" }).click();
await dropdown.getByText("Sign Out").waitFor();
await dropdown.getByText("Sign Out").click(); await dropdown.getByText("Sign Out").click();
await page.waitForURL(config.INSTANCE_URL.toString()); await page.waitForURL(config.INSTANCE_URL.toString());