Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
fix: bot hangs occasionally
Browse files Browse the repository at this point in the history
Do not wait for button clicked as it hangs the bot. It may be a bug of
selenium or Shopee frontend website is not responsing well.
  • Loading branch information
wdzeng committed Jul 11, 2023
1 parent 43b0f26 commit e3dcb7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tw-shopee-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class TaiwanShopeeBot {
const btnLogin = await this.driver.findElement(By.xpath(xpathByText('button', '登入')))
// Wait until the login button is enabled.
await this.driver.wait(until.elementIsEnabled(btnLogin), waitTimeout)
await btnLogin.click()
btnLogin.click() // do not wait for click since it may hang = =
logger.debug('Login form submitted.')

// Wait for something happens.
Expand Down

0 comments on commit e3dcb7c

Please sign in to comment.