Skip to content

azizemad-coder/browser-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Browser Automation Toolkit

A powerful browser automation toolkit with profile management, script execution capabilities, and an interactive CLI interface.

Features

  • 🧩 Profile Management: Create and manage isolated browser profiles with custom settings
  • 🌐 Browser Launcher: Launch browsers with configurable options (headless, stealth, proxies)
  • 📜 Script System: Create, manage and run automation scripts
  • 🧹 Cleanup Tools: Automatically manage old profiles
  • 🔍 Element Inspector: Interactive element inspection for selector generation
  • 🛡️ Proxy Support: Configure proxies for individual profiles
  • 💻 Multiple Browser Support: Works with Brave browser and Chromium

Installation

# Clone the repository
git clone https://github.com/azizemad-coder/browser-automation
cd browser-automation

# Install dependencies
npm install
# or
pnpm install

Usage

Interactive CLI

The project includes an interactive command-line interface for easy usage:

npm start
# or
node src/cli.mjs

This will display the main menu with options for:

  • Profile Management
  • Browser Launching
  • Script Management
  • Cleanup Tools
  • Inspector Tools

Command Line Usage

You can also use the CLI with command-line arguments:

# Create a profile
node src/cli.mjs profile --create "MyProfile" --category "Testing"

# List profiles
node src/cli.mjs profile --list

# Launch browser with profile
node src/cli.mjs launch --profile "MyProfile" --url "https://example.com"

# Run a script
node src/cli.mjs script --run "myscript" --profile "MyProfile"

Profile Management

Create and manage isolated browser profiles:

# Create a profile interactively
npm run profile:create

# List all profiles
npm run profile:list

Scripts System

The automation toolkit includes a powerful scripting system for creating and running automated workflows:

Creating Scripts

Scripts can be created in two ways:

  1. Using Templates: Choose from pre-built templates for common tasks
  2. Interactive Creation: Build scripts step-by-step with guided prompts
# Start script management interface
node src/cli.mjs script

Script Actions

Scripts can include various actions:

  • Navigation (goto URLs)
  • Click interactions
  • Form filling/typing text
  • Waiting for elements or time delays
  • Taking screenshots
  • Custom JavaScript execution

Login Automation

You can easily create login automation scripts:

  1. Select "Create New Script" from the script menu
  2. Add actions to:
    • Navigate to the login page
    • Enter username/password
    • Click login button
    • Optionally handle 2FA
    • Verify successful login

Example login script:

{
  "metadata": {
    "description": "Login to example.com",
    "author": "User",
    "tags": ["login"]
  },
  "actions": [
    { "type": "goto", "url": "https://example.com/login" },
    { "type": "type", "selector": "#username", "text": "your_username" },
    { "type": "type", "selector": "#password", "text": "your_password" },
    { "type": "click", "selector": "#login-button" },
    { "type": "waitForElement", "selector": ".dashboard-welcome", "timeout": 5000 }
  ],
  "settings": {
    "timeout": 30000,
    "retries": 3,
    "waitBetweenActions": 1000,
    "screenshotOnError": true
  }
}

TikTok Auto Uploader

The TikTok Auto Uploader is a Python-based module for automating TikTok uploads:

Features

  • Automated login to TikTok accounts
  • Bulk video uploading
  • Caption management
  • Scheduling posts
  • Cookie management for persistent sessions

Installation

# Navigate to TikTok Auto Uploader directory
cd TiktokAutoUploader

# Install Python requirements
pip install -r requirements.txt

Usage

  1. Import Cookies (if available):

    python import_cookies.py
  2. Login to TikTok:

    • The first time you run the uploader, it will prompt you to log in
    • Credentials can be stored in the config.txt file
  3. Upload Videos:

    python cli.py --video "/path/to/video.mp4" --caption "Your TikTok caption #hashtags" 
  4. Bulk Upload:

    python cli.py --directory "/path/to/videos" --batch

Configuration

Edit the config.txt file to customize:

  • Default captions
  • Hashtags
  • Upload settings
  • Account credentials (optional)

Requirements

  • Node.js >= 16.0.0
  • NPM or PNPM
  • Brave Browser (optional, will use bundled Chromium if not found)
  • Python 3.x (for TikTok Auto Uploader)

License

MIT

About

A powerful browser automation toolkit with profile management, script execution capabilities, and an interactive CLI interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors