Skip to content

Commit

Permalink
Update Main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
MariuszSzpyt committed Jan 20, 2025
1 parent ad95bd8 commit e493d45
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions utils/frontend/rollup-pages/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ export class Main {
const welcomeButton = buildXpathByElementText("button", "Start trading");
const welcomeButtonAlternate = buildXpathByElementText("button", "START TRADING");
await sleep(3000);

await waitForElementVisible(this.driver, welcomeButton, 3000);
await clickElement(this.driver, welcomeButton);

try {
await waitForElementVisible(this.driver, welcomeButton, 5000);
await clickElement(this.driver, welcomeButton);
} catch (error) {
//Button not found - no action performed.
}
try {
await waitForElementVisible(this.driver, welcomeButtonAlternate, 5000);
await waitForElementVisible(this.driver, welcomeButtonAlternate, 3000);
await clickElement(this.driver, welcomeButton);
} catch (error) {
//Button not found - no action performed.
Expand Down

0 comments on commit e493d45

Please sign in to comment.