Skip to content

## Rectify Error in WhatsApp Automation sendMsg Function #349

@Om7035

Description

@Om7035

Description

The sendMsg function in src/apps/pages/automations/Messenger/whatsApp.py has a TODO comment indicating there's an error that needs to be rectified. The current implementation uses pywhatkit.sendwhatmsg_instantly() combined with pyautogui keyboard simulation, which is unreliable and prone to failures.

Problem

The current approach has several issues:

  1. Relies on browser automation which is fragile
  2. Uses hardcoded sleep times that may not work on all systems
  3. No proper error handling for common failure scenarios
  4. Browser focus issues can cause messages to be sent incorrectly

Proposed Solution

  1. Replace the current implementation with a more reliable approach
  2. Add proper error handling and validation
  3. Implement retry mechanisms for transient failures
  4. Add user feedback for success/failure states

Acceptance Criteria

  • Messages are sent reliably across different systems
  • Proper error handling for network issues, authentication failures, etc.
  • User-friendly feedback for success and failure cases
  • No dependency on browser automation or UI simulation

Assignees:
Labels: bug, enhancement, good first issue

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions