File size: 617 Bytes
6a8fee8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import subprocess
import sys

def setup_e2e():
    """Installs Playwright and its browser dependencies."""
    print("🚀 Installing Playwright browsers...")
    try:
        subprocess.run([sys.executable, "-m", "playwright", "install", "--with-deps", "chromium"], check=True)
        print("✅ Playwright installation successful.")
    except subprocess.CalledProcessError as e:
        print(f"❌ Playwright installation failed: {e}")
    except FileNotFoundError:
        print("❌ Playwright module not found. Please run 'pip install -r requirements.txt' first.")

if __name__ == "__main__":
    setup_e2e()