Skip to content

Galen Framework ported to TypeScript with Playwright support #669

Description

@kushneryk

Hi,

I've created a TypeScript port of Galen Framework that uses Playwright instead of Selenium:

https://github.com/kushneryk/galen-ts

What it does

  • Full implementation of the Galen Spec Language (.gspec files)
  • All spec types: width, height, above, below, inside, near, aligned, centered, text, css, image, count, component, etc.
  • All directives: @objects, @set, @groups, @import, @on, @if/@elseif/@else, @forEach/@for, @rule, @script
  • Validation engine with geometric calculations
  • HTML, JSON, and JUnit report generation
  • Test suite runner with parallel execution
  • 491 tests passing

Why

  • Galen Framework hasn't been updated since 2017
  • Selenium is being replaced by Playwright in most projects
  • TypeScript/Node.js ecosystem is where most frontend testing happens today
  • npm install instead of Java setup

Usage

import { Galen } from 'galen-ts';
import { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com');

const report = await Galen.checkLayout(page, './specs/home.gspec');

Same .gspec files, same spec language — just Playwright instead of Selenium.

Licensed under Apache 2.0, same as the original.

Would love any feedback from the community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions