Commit graph

8 commits

Author SHA1 Message Date
SnapAPI Developer
9290c759da feat: add userAgent parameter for custom User-Agent headers
Some checks failed
Build & Deploy to Staging / Build & Deploy to Staging (push) Has been cancelled
- Add userAgent?: string to ScreenshotOptions interface
- Implement validation (max 500 chars, no newlines for security)
- Call page.setUserAgent() after page acquisition, before navigation
- Add route handler support for both POST body and GET query
- Add comprehensive test coverage (11 new tests)
- Update OpenAPI documentation with parameter specs and examples
- Update Node.js and Python SDK README examples
- All userAgent tests passing (414 → 425 total tests)

Fixes potential HTTP header injection by rejecting newlines.
Enables custom User-Agent strings for specific browser emulation needs.
2026-03-05 15:10:06 +01:00
SnapAPI Developer
91a08bab70 Add js parameter for custom JavaScript injection
- Add js parameter to ScreenshotOptions interface (max 5000 chars)
- Execute JavaScript via page.evaluate() after delay, before CSS/hideSelectors
- 5-second timeout with JS_TIMEOUT error handling
- JS_EXECUTION_ERROR for script failures with sanitized error messages
- Support in both GET and POST endpoints with validation
- Updated OpenAPI spec for both GET and POST routes
- Added comprehensive test coverage (service + route layers)
- Updated SDK documentation (Node.js and Python) with examples

Test results: 414 tests passing (includes new JS injection tests)
2026-03-05 12:07:54 +01:00
0999474fbd feat: add css parameter for custom CSS injection in screenshots
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 10m33s
2026-03-04 21:06:50 +01:00
Hoid (OpenClaw)
e6c34ef760 Add comprehensive tests and docs for darkMode & hideSelectors
Some checks failed
Build & Deploy to Staging / Build & Deploy to Staging (push) Has been cancelled
- Add 5 new Python tests for darkMode and hideSelectors parameters
- Update Node.js SDK README with darkMode/hideSelectors examples
- Update Python SDK README with darkMode/hideSelectors examples
- Add API reference entries for new parameters
- All tests passing: Node.js (19 tests), Python (22 tests)

Features already implemented in v0.7.0 but needed better test coverage and documentation.
2026-03-04 18:04:18 +01:00
OpenClaw Dev
90c1e7da44 feat: add darkMode and hideSelectors to Node.js and Python SDKs
Some checks failed
Build & Deploy to Staging / Build & Deploy to Staging (push) Has been cancelled
2026-03-04 15:07:20 +01:00
OpenClaw
195a656a7d fix(sdk): BUG-015 validate URL in capture() when using ScreenshotOptions
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 9m14s
- Add URL validation after options.to_dict() in Python SDK
- Add failing test first (TDD), then fix
- All 17 Python SDK tests passing
2026-02-27 11:01:11 +00:00
dfd410f842 test: add comprehensive SDK unit tests (Node.js + Python)
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 9m29s
2026-02-27 08:05:22 +00:00
66ecc471cf feat: add Node.js and Python SDKs
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 9m1s
- Node.js SDK: TypeScript, ESM+CJS, zero deps (uses native fetch)
- Python SDK: zero deps (uses urllib), Python 3.8+
- Both fully documented with examples and type hints
- Ready for npm/PyPI publishing
2026-02-23 14:02:15 +00:00