Skip to content

keithsecond/prospects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PROSPECTS

Playwright TypeScript Node.js

A comprehensive Playwright-based tool for automated job search across multiple employment platforms. Features parallel test execution, batch job consolidation, and stateful job tracking.

✨ Features

  • Parallel Test Execution: Run job searches across multiple sites simultaneously using all CPU cores
  • Batch Job Consolidation: Safe file writing prevents data collisions during parallel execution
  • Stateful Job Tracking: Maintains job application status and notes
  • Multiple Job Boards: Supports ADP, ApplyToJob, SchoolSpring, Applitrack, and recruiter platforms
  • Custom Browser Automation: Includes CDP browser integration for enhanced scraping capabilities
  • Comprehensive Reporting: HTML test reports with screenshots and traces

πŸ“ Project Structure

prospects/
β”‚
β”œβ”€β”€ auth/                   # Authentication storage (.gitignore)
β”œβ”€β”€ tests/                  # Test specifications for each job board
β”œβ”€β”€ pages/                  # Page Object Model classes
β”œβ”€β”€ fixtures/               # Shared test fixtures and configurations
β”œβ”€β”€ classes/                # Helper utilities for JSON data mapping
β”œβ”€β”€ test-data/              # JSON datastores (.gitignore)
β”‚   β”œβ”€β”€ jobResults.json     # Consolidated job search results
β”‚   β”œβ”€β”€ sites.json          # Configured job search sites
β”‚   └── .batch/             # Temporary batch files (auto-cleaned)
β”œβ”€β”€ playwright.config.ts    # Playwright configuration
β”œβ”€β”€ globalTeardown.ts       # Post-test cleanup handler
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
└── tsconfig.json

πŸš€ Installation

Prerequisites

  • Node.js 16+
  • npm or yarn

Setup

Install Dependencies Playwright browsers

npm install
npx playwright install chromium

πŸ“– Usage

Basic Job Search

Run all configured job searches in parallel:

npm test

Single Site Testing

Test a specific job board:

# ADP Workboards
npx playwright test tests/adpJobs.spec.ts

# ApplyToJob sites
npx playwright test tests/atjJobs.spec.ts

# School districts
npx playwright test tests/schoolspringJobs.spec.ts

Custom Search Queries

Search for specific job terms:

# Set search term and run recruiter search
export SEARCH="software engineer"
npx playwright test tests/R001Search.spec.ts
unset SEARCH

Browser Compatibility Testing

Test CDP browser integration:

npx playwright test tests/uaWebdriver.spec.ts --ui

CI/CD Execution

For continuous integration (runs serially):

CI=true npm test

πŸ”§ Configuration

Job Sites Configuration

Edit test-data/sites.json to add or modify job search sites:

{
  "Private": [
    {
      "id": "P001",
      "org": "Example School",
      "URL": "https://example.com/jobs",
      "Provider": "ADP"
    }
  ]
}

Playwright Configuration

Modify playwright.config.ts for custom settings:

  • Parallel execution: fullyParallel: true
  • Worker count: workers: undefined (auto-detect CPU cores)
  • Timeouts: Adjust timeouts for slower sites
  • Browser options: Configure browser launch parameters

πŸ“Š Results & Data Management

Job Results Structure

Jobs are stored in test-data/jobResults.json with the following structure:

{
  "Organization Name": {
    "Site": "Organization Name",
    "URL": "https://example.com/jobs",
    "jobs": [
      {
        "id": "JOB123",
        "title": "Software Engineer",
        "link": "https://example.com/job/JOB123",
        "status": "0",
        "date": "2024-01-15",
        "notes": ""
      }
    ]
  }
}

Status Definitions

  • "0": New job
  • "1": Applied
  • "2": Received reply
  • "3": Interviewing
  • "4": Declined

πŸ› οΈ Development

Adding New Job Boards

  1. Create Page Object Model in pages/

    export class NewJobBoard {
      constructor(page: Page, siteId?: string) {}
      async searchPage() { /* Navigate to search page */ }
      async getJobs(): Promise<Job[]> { /* Extract jobs */ }
    }
  2. Add test specification in tests/

    test.describe('New Job Board', () => {
      const sites = Utilities.getSitesByProvider('newboard');
      sites.forEach(site => {
        test(`Search ${site.org}`, async ({ page }) => {
          const board = new NewJobBoard(page, site.id);
          await board.searchPage();
          const jobs = await board.getJobs();
          await utils.batchAppendJobs(site.id, jobs);
        });
      });
    });
  3. Update site configuration in test-data/sites.json

Running Tests in Development

# Run with UI mode for debugging
npx playwright test --ui

# Run specific test with debugging
npx playwright test tests/example.spec.ts --debug

# Generate and view HTML report
npx playwright show-report

πŸ“‹ TODO

  • Deploy self-hosted chrome-debug docker container via Github actions
  • Add more job board integrations
  • Implement job application automation
  • Add email notifications for new jobs
  • Create web dashboard for job tracking vibe-tracker
  • Add job filtering and search capabilities
  • Document API for external integrations

⚠️ Disclaimer

This tool is a proof of concept and should not be used in a production environment. It is designed for educational purposes only.

Important: According to the terms of service of most job search websites, the use of robots, spiders, manual, and/or automatic processes, or devices to data-mine, data-crawl, scrape, or index websites is prohibited. Use this tool responsibly and at your own risk.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors