{"id":28515027,"url":"https://github.com/percy/percy-selenium-dotnet","last_synced_at":"2026-04-28T00:33:49.412Z","repository":{"id":61952903,"uuid":"508764057","full_name":"percy/percy-selenium-dotnet","owner":"percy","description":"Percy visual testing for .NET Selenium","archived":false,"fork":false,"pushed_at":"2026-03-30T11:25:36.000Z","size":284,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2026-03-30T13:18:33.441Z","etag":null,"topics":["percy-sdk","selenium","selenium-dotnet","selenium-webdriver","visual-testing"],"latest_commit_sha":null,"homepage":"https://docs.percy.io/docs/selenium-dotnet","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/percy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-06-29T16:17:46.000Z","updated_at":"2026-03-30T11:14:08.000Z","dependencies_parsed_at":"2023-02-16T22:15:55.135Z","dependency_job_id":"56976223-3c02-40cf-b192-4300b7e383c1","html_url":"https://github.com/percy/percy-selenium-dotnet","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/percy/percy-selenium-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/percy%2Fpercy-selenium-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/percy%2Fpercy-selenium-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/percy%2Fpercy-selenium-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/percy%2Fpercy-selenium-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/percy","download_url":"https://codeload.github.com/percy/percy-selenium-dotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/percy%2Fpercy-selenium-dotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32361477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["percy-sdk","selenium","selenium-dotnet","selenium-webdriver","visual-testing"],"created_at":"2025-06-09T02:35:13.180Z","updated_at":"2026-04-28T00:33:49.406Z","avatar_url":"https://github.com/percy.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# percy-selenium-dotnet\n![Test](https://github.com/percy/percy-selenium-dotnet/workflows/Test/badge.svg)\n\n[Percy](https://percy.io) visual testing for .NET Selenium.\n\n## Development\n\nInstall/update `@percy/cli` dev dependency (requires Node 14+):\n\n```sh-session\n$ npm install --save-dev @percy/cli\n```\n\nInstall dotnet SDK:\n\n```sh-session\n$ brew tap isen-ng/dotnet-sdk-versions\n$ brew install --cask  dotnet-sdk5-0-400\n$ dotnet --list-sdks\n```\n\nInstall Mono:\n\n```sh-session\n$ brew install mono\n$ mono --version \n```\n\nRun tests:\n\n```\nnpm run test\n```\n\n## Installation\n\nnpm install `@percy/cli` (requires Node 14+):\n\n```sh-session\n$ npm install --save-dev @percy/cli\n```\n\nInstall the PercyIO.Selenium package (for example, with .NET CLI):\n\n```sh-session\n$ dotnet add package PercyIO.Selenium\n```\n\n## Usage\n\nThis is an example test using the `Percy.Snapshot` method.\n\n``` csharp\nusing PercyIO.Selenium;\n\n// ... other test code\n\nFirefoxOptions options = new FirefoxOptions();\nFirefoxDriver driver = new FirefoxDriver(options);\ndriver.Navigate().GoToUrl(\"http://example.com\");\n​\n// take a snapshot\nPercy.Snapshot(driver, \".NET example\");\n\n// snapshot options using an anonymous object\nPercy.Snapshot(driver, \".NET anonymous options\", new {\n  widths = new [] { 600, 1200 }\n});\n\n// snapshot options using a dictionary-like object\nPercy.Options snapshotOptions = new Percy.Options();\nsnapshotOptions.Add(\"minHeight\", 1280);\nPercy.Snapshot(driver, \".NET typed options\", snapshotOptions);\n```\n\nRunning the above normally will result in the following log:\n\n```sh-session\n[percy] Percy is not running, disabling snapshots\n```\n\nWhen running with [`percy\nexec`](https://github.com/percy/cli/tree/master/packages/cli-exec#percy-exec), and your project's\n`PERCY_TOKEN`, a new Percy build will be created and snapshots will be uploaded to your project.\n\n```sh-session\n$ export PERCY_TOKEN=[your-project-token]\n$ percy exec -- [your test command]\n[percy] Percy has started!\n[percy] Created build #1: https://percy.io/[your-project]\n[percy] Snapshot taken \".NET example\"\n[percy] Snapshot taken \".NET anonymous options\"\n[percy] Snapshot taken \".NET typed options\"\n[percy] Stopping percy...\n[percy] Finalized build #1: https://percy.io/[your-project]\n[percy] Done!\n```\n\n## Configuration\n\n`void Percy.Snapshot(WebDriver driver, string name, object? options)`\n\n- `driver` (**required**) - A selenium-webdriver driver instance\n- `name` (**required**) - The snapshot name; must be unique to each snapshot\n- `options` - An object containing various snapshot options ([see per-snapshot configuration options](https://www.browserstack.com/docs/percy/take-percy-snapshots/overview#per-snapshot-configuration))\n\n## Running Percy on Automate\n`Percy.Screenshot(driver, name, options)` [ needs @percy/cli 1.27.0-beta.0+ ];\n\nThis is an example test using the `Percy.Screenshot` method.\n\n``` csharp\n// ... other test code\n// import\nusing PercyIO.Selenium;\nclass Program\n{\n  static void Main(string[] args)\n  {\n\n    // Add caps here\n    RemoteWebDriver driver = new RemoteWebDriver(\n      new Uri(\"https://hub-cloud.browserstack.com/wd/hub\"),capabilities);\n​\n\n    // navigate to webpage\n    driver.Navigate().GoToUrl(\"https://www.percy.io\");\n\n    // take screenshot\n    Percy.Screenshot(\"dotnet screenshot-1\");\n\n    // quit driver\n    driver.quit();\n  }\n}\n```\n\n- `driver` (**required**) - A Selenium driver instance\n- `name` (**required**) - The screenshot name; must be unique to each screenshot\n- `options` (**optional**) - There are various options supported by Percy.Screenshot to server further functionality.\n    - `fullPage` - Boolean value by default it falls back to `false`, Takes full page screenshot [From CLI v1.27.6+]\n    - `freezeAnimatedImage` - Boolean value by default it falls back to `false`, you can pass `true` and percy will freeze image based animations.\n    - `freezeImageBySelectors` - List of selectors. Images will be freezed which are passed using selectors. For this to work `freezeAnimatedImage` must be set to true.\n    - `freezeImageByXpaths` - List of xpaths. Images will be freezed which are passed using xpaths. For this to work `freezeAnimatedImage` must be set to true.\n    - `percyCSS` - Custom CSS to be added to DOM before the screenshot being taken. Note: This gets removed once the screenshot is taken.\n    - `ignoreRegionXpaths` - List of xpaths. elements in the DOM can be ignored using xpath\n    - `ignoreRegionSelectors` - List of selectors. elements in the DOM can be ignored using selectors.\n    - `ignoreRegionSeleniumElements` - List of selenium web-element. elements can be ignored using selenium_elements.\n    - `customIgnoreRegions` - List of custom objects. elements can be ignored using custom boundaries. Just passing a simple object for it like below.\n      - Refer to example -\n        - ```\n          List\u003cobject\u003e ignoreCustomElement = new List\u003cobject\u003e();\n          var region1 = new Dictionary\u003cstring, int\u003e();\n          region1.Add(\"top\", 10);\n          region1.Add(\"bottom\", 120);\n          region1.Add(\"right\", 10);\n          region1.Add(\"left\", 10);\n          ignoreCustomElement.Add(region1);\n          region1.Add(\"custom_ignore_regions\", ignoreCustomElement);\n          ```\n    - `considerRegionXpaths` - List of xpaths. elements in the DOM can be considered for diffing and will be ignored by Intelli Ignore using xpaths.\n    - `considerRegionSelectors` - List of selectors. elements in the DOM can be considered for diffing and will be ignored by Intelli Ignore using selectors.\n    - `considerRegionSeleniumElements` - List of selenium web-element. elements can be considered for diffing and will be ignored by Intelli Ignore using selenium_elements.\n    - `customConsiderRegions` - List of custom objects. elements can be considered for diffing and will be ignored by Intelli Ignore using custom boundaries\n      - Refer to example -\n        - ```\n          List\u003cobject\u003e considerCustomElement = new List\u003cobject\u003e();\n          var region2 = new Dictionary\u003cstring, int\u003e();\n          region2.Add(\"top\", 10);\n          region2.Add(\"bottom\", 120);\n          region2.Add(\"right\", 10);\n          region2.Add(\"left\", 10);\n          considerCustomElement.Add(region2);\n          region2.Add(\"custom_consider_regions\", considerCustomElement);\n          ```\n        - Parameters:\n          - `top` (int): Top coordinate of the consider region.\n          - `bottom` (int): Bottom coordinate of the consider region.\n          - `left` (int): Left coordinate of the consider region.\n          - `right` (int): Right coordinate of the consider region.\n    - `regions` parameter that allows users to apply snapshot options to specific areas of the page. This parameter is an array where each object defines a custom region with configurations.\n      - Parameters:\n       - `elementSelector` (optional, only one of the following must be provided, if this is not provided then full page will be considered as region)\n            - `boundingBox` (object): Defines the coordinates and size of the region.\n              - `x` (number): X-coordinate of the region.\n              - `y` (number): Y-coordinate of the region.\n              - `width` (number): Width of the region.\n              - `height` (number): Height of the region.\n            - `elementXpath` (string): The XPath selector for the element.\n            - `elementCSS` (string): The CSS selector for the element.\n        - `algorithm` (mandatory)\n            - Specifies the snapshot comparison algorithm.\n            - Allowed values: `standard`, `layout`, `ignore`, `intelliignore`.\n        - `configuration` (required for `standard` and `intelliignore` algorithms, ignored otherwise)\n            - `diffSensitivity` (number): Sensitivity level for detecting differences.\n            - `imageIgnoreThreshold` (number): Threshold for ignoring minor image differences.\n            - `carouselsEnabled` (boolean): Whether to enable carousel detection.\n            - `bannersEnabled` (boolean): Whether to enable banner detection.\n            - `adsEnabled` (boolean): Whether to enable ad detection.\n         - `assertion` (optional)\n            - Defines assertions to apply to the region.\n            - `diffIgnoreThreshold` (number): The threshold for ignoring minor differences.\n\n\n### Creating Percy on automate build\nNote: Automate Percy Token starts with `auto` keyword. The command can be triggered using `exec` keyword.\n```sh-session\n$ export PERCY_TOKEN=[your-project-token]\n$ percy exec -- [dotnet test command]\n[percy] Percy has started!\n[percy] [Dotnet example] : Starting automate screenshot ...\n[percy] Screenshot taken \"Dotnet example\"\n[percy] Stopping percy...\n[percy] Finalized build #1: https://percy.io/[your-project]\n[percy] Done!\n```\n\nRefer to docs here: [Percy on Automate](https://www.browserstack.com/docs/percy/integrate/functional-and-visual)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpercy%2Fpercy-selenium-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpercy%2Fpercy-selenium-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpercy%2Fpercy-selenium-dotnet/lists"}