Add Robot Framework support via PercyLibrary (Browser library)#138
Open
neha-sanse wants to merge 9 commits intomainfrom
Open
Add Robot Framework support via PercyLibrary (Browser library)#138neha-sanse wants to merge 9 commits intomainfrom
neha-sanse wants to merge 9 commits intomainfrom
Conversation
Adds native Robot Framework keywords for Percy visual testing using the Browser library (robotframework-browser / Playwright): - Percy Snapshot — capture DOM snapshots with all options - Create Percy Region — build ignore/consider region definitions - Percy Is Running — check Percy CLI availability Robot Framework and Playwright imports are wrapped for graceful degradation — existing percy-playwright behavior is unchanged when robotframework is not installed. Uses lazy imports so playwright is only loaded when keywords are actually called. Includes _BrowserLibraryPageAdapter that bridges Browser library keywords to the Playwright page interface percy_snapshot() expects. 12 new tests covering parse helpers, keyword dispatch, and lazy imports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 end-to-end Robot tests using Browser library (Playwright) covering all Percy keywords: basic snapshots, responsive widths, min height, Percy CSS, scoped snapshots, JS/layout/shadow DOM, labels, test case metadata, ignore/consider/intelliignore regions, all options combined, and utility keywords. Run with: percy exec -- robot tests/test_robot_integration.robot Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ror, exclude robot_library from coverage Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…port Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cess, import-outside-toplevel Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cy_snapshot Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show full workflow for using Create Percy Region with Percy Snapshot, including multiple regions, padding, and bounding box examples. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shorten docstring examples to stay within 100-char limit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds native Robot Framework keywords for Percy visual testing using the Browser library (robotframework-browser / Playwright backend). Mirrors the same PR on percy-selenium-python (#220) for the Selenium backend.
What's added
percy/robot_library.py— Robot Framework library with keywords and Browser library adaptertests/test_robot_library.py— 12 testspercy/__init__.pydevelopment.txt— added robotframework and robotframework-browserKeywords
Key design decisions
import robotwrapped intry/except— zero impact when robotframework is not installedpercy.screenshot— playwright only loaded when keywords are called, not at import time_BrowserLibraryPageAdapterbridges Browser library keywords to the Playwright page interface thatpercy_snapshot()expectsImportErrorwith clear messageUsage
percy exec -- robot tests/Test plan
Related
🤖 Generated with Claude Code