SeleniumFW - A minimal Selenium test framework that adapt POM
Project description
SeleniumFW 🚀
A lightweight, POM structured test automation framework for Python + Selenium, including:
📦 Project scaffolding with sfw init
⟳ Test suite, test case, feature, and step generation using Jinja2 templating
▶️ Runner for executing feature (.feature), YAML suite, or .py test case files
🌐 REST API server (sfw serve) to list and schedule test suites
🔗 API client module (seleniumfw.api_client) for programmatic integration
⚙️ Typer-powered CLI for all commands
🛡️ Hooks/listener system, dotenv support, jinja templating
🔧 Features
sfw init — bootstrap a complete SeleniumFW project scaffold
sfw create-testsuite — generate boilerplate YAML test suite & .py for its test suite hook
sfw create-testsuite-collection — generate boilerplate YAML test suite collection
sfw create-testcase — generate a .py test case stub
sfw create-listener — generate a test listener
sfw create-feature — generate a .feature file
sfw implement-feature — autogenerate step definitions from your .feature
sfw run — run one of .feature, .yml, or .py test scripts
sfw serve [--port ] — expose a REST API to list, run, and schedule test suites
✅ Installation
pip install seleniumfw
Or locally:
git clone https://github.com/badrusalam11/seleniumfw.git cd seleniumfw pip install -e .
🚀 Quick Start
- Scaffold a new project
sfw init myproject cd myproject
- Create testsuite/feature/case
sfw create-testsuite login sfw create-feature login sfw implement-feature login
-
Add test logic in testcases/, steps/, etc.
-
Run tests
sfw run features/login.feature # via behave sfw run testsuites/login.yml # via runner
🌐 API Testing Example
You can use the same ApiClient to test any public free REST API, for example JSONPlaceholder:
from seleniumfw.api_client import ApiClient
initialize client for JSONPlaceholder
client = ApiClient( base_url="https://jsonplaceholder.typicode.com", default_headers={"Accept": "application/json"} )
GET a list of posts
response = client.get("/posts") assert response.status_code == 200 posts = response.json() assert isinstance(posts, list) print(f"Retrieved {len(posts)} posts")
GET a single post
response = client.get("/posts/1") assert response.status_code == 200 post = response.json() assert post.get("id") == 1 print(f"Post title: {post.get('title')}")
POST a new post (will return a mock id)
new_post = { "title": "foo", "body": "bar", "userId": 1 } response = client.post("/posts", json=new_post) assert response.status_code == 201 created = response.json() assert created.get("id") is not None print(f"Created post ID: {created.get('id')}")
🛠️ Configuration
Use a .env in your project root to customize:
APP_PORT=5006 SERVER_URL=http://localhost:5006
💡 Why use SeleniumFW?
🧠 Inspired by Katalon, but for Python developers
🌟 Supports feature files + step generation + scheduling
🚀 Design for both CLI use and API integration
🧹 Expandable via listeners/hooks, Config, BrowserFactory, etc.
🤝 Contributing
PRs are welcome! Please ensure:
Code is well-documented and follows PEP8
Templates & CLI updated accordingly
README.md and tests updated
Use Black, Flake8, isort (recommended)
📜 License
MIT — see LICENSE for details.
📨 Contact
Built & maintained by Muhamad Badru Salam — QA Automation Engineer (SDET)
Github: badrusalam11
LinkedIn: Muhamad Badru Salam
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seleniumfw-0.3.2.tar.gz.
File metadata
- Download URL: seleniumfw-0.3.2.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf7e0bed155106432379d1c2dc80b2c2a5fbe5ca4861dac6ca60cffa1826ee97
|
|
| MD5 |
2df86246ebd3229cb2fb9f188da1761b
|
|
| BLAKE2b-256 |
b9c71f42e31993a30e1bd92085108c30ac3301074a381d634f0d3a6152535bac
|
File details
Details for the file seleniumfw-0.3.2-py3-none-any.whl.
File metadata
- Download URL: seleniumfw-0.3.2-py3-none-any.whl
- Upload date:
- Size: 37.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efd82a5f904edf920fa5f4938c5f2bfed685fad2aff2d345c6823284494f9c0d
|
|
| MD5 |
1dfdeac450d8cfc356a5e6418cd52a0f
|
|
| BLAKE2b-256 |
1ecd585bd9a862208c74061083b5d9e230201b18bd43ae6f7e4477859dd38310
|