Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetrunic committed Oct 4, 2022
1 parent 5ee96ec commit c520229
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/helpers/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ export const clickOnSettingsSwitch = async (page: Page, text: string): Promise<v
};

export const openNetworkDropdown = async (page: Page): Promise<void> => {
const networkSwitcher = await page.waitForSelector('.network-display');
await networkSwitcher.click();
await page.waitForSelector('.network-dropdown-list', { visible: true });
const networkSwitcher = await page.waitForSelector('.network-display', { visible: true });
try {
await networkSwitcher.click();
await page.waitForSelector('.network-dropdown-list', { visible: true, timeout: 1000 });
} catch (e) {
//retry on fail
await networkSwitcher.click();
await page.waitForSelector('.network-dropdown-list', { visible: true, timeout: 1000 });
}
};

export const openProfileDropdown = async (page: Page): Promise<void> => {
Expand Down

0 comments on commit c520229

Please sign in to comment.