{"id":18937492,"url":"https://github.com/verifytests/verify.headlessbrowsers","last_synced_at":"2025-04-15T18:32:12.595Z","repository":{"id":41270884,"uuid":"279545084","full_name":"VerifyTests/Verify.HeadlessBrowsers","owner":"VerifyTests","description":"Extends Verify to allow verification of Web UIs using Selenium, Playwright, or Puppeteer","archived":false,"fork":false,"pushed_at":"2025-04-15T11:58:48.000Z","size":2353,"stargazers_count":24,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T12:16:07.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/VerifyTests.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"VerifyTests"}},"created_at":"2020-07-14T09:44:49.000Z","updated_at":"2025-04-15T11:55:58.000Z","dependencies_parsed_at":"2023-12-16T04:45:58.508Z","dependency_job_id":"1eed694e-6840-4f7e-ae15-d8e4b4e02ab6","html_url":"https://github.com/VerifyTests/Verify.HeadlessBrowsers","commit_stats":{"total_commits":348,"total_committers":4,"mean_commits":87.0,"dds":0.0977011494252874,"last_synced_commit":"203be9b9ad85bd59e8af85110dffef401b812201"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.HeadlessBrowsers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.HeadlessBrowsers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.HeadlessBrowsers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.HeadlessBrowsers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VerifyTests","download_url":"https://codeload.github.com/VerifyTests/Verify.HeadlessBrowsers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249129265,"owners_count":21217317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-08T12:11:26.371Z","updated_at":"2025-04-15T18:32:07.587Z","avatar_url":"https://github.com/VerifyTests.png","language":"C#","funding_links":["https://github.com/sponsors/VerifyTests"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"/src/icon.png\" height=\"30px\"\u003e Verify Headless Browsers\n\n[![Discussions](https://img.shields.io/badge/Verify-Discussions-yellow?svg=true\u0026label=)](https://github.com/orgs/VerifyTests/discussions)\n[![Build status](https://ci.appveyor.com/api/projects/status/n4q42hbpf32jwafg?svg=true)](https://ci.appveyor.com/project/SimonCropp/verify-headlessbrowsers)\n[![NuGet Status](https://img.shields.io/nuget/v/Verify.Playwright.svg?label=Verify.Playwright)](https://www.nuget.org/packages/Verify.Playwright/)\n[![NuGet Status](https://img.shields.io/nuget/v/Verify.Puppeteer.svg?label=Verify.Puppeteer)](https://www.nuget.org/packages/Verify.Puppeteer/)\n[![NuGet Status](https://img.shields.io/nuget/v/Verify.Selenium.svg?label=Verify.Selenium)](https://www.nuget.org/packages/Verify.Selenium/)\n\nExtends [Verify](https://github.com/VerifyTests/Verify) to allow verification of Web UIs using headless browsers.\n\n**See [Milestones](../../milestones?state=closed) for release notes.**\n\n\n## Playwright Usage\n\nVerification of Web UIs via [Playwright](https://github.com/microsoft/playwright-sharp).\n\n\n### NuGet package\n\nhttps://nuget.org/packages/Verify.Playwright/\n\n\n### Enable\n\nEnable VerifyPlaywright once at assembly load time:\n\n\u003c!-- snippet: PlaywrightEnable --\u003e\n\u003ca id='snippet-PlaywrightEnable'\u003e\u003c/a\u003e\n```cs\n[ModuleInitializer]\npublic static void InitPlaywright() =\u003e\n    VerifyPlaywright.Initialize(installPlaywright: true);\n```\n\u003csup\u003e\u003ca href='/src/Tests/ModuleInitializer.cs#L11-L17' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PlaywrightEnable' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Instantiate browser\n\n\u003c!-- snippet: PlaywrightBuild --\u003e\n\u003ca id='snippet-PlaywrightBuild'\u003e\u003c/a\u003e\n```cs\n// wait for target server to start\nawait SocketWaiter.Wait(port: 5000);\n\nplaywright = await Playwright.CreateAsync();\nbrowser = await playwright.Chromium.LaunchAsync();\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.cs#L12-L20' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PlaywrightBuild' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Page test\n\nThe current page state can be verified as follows:\n\n\u003c!-- snippet: PlaywrightPageUsage --\u003e\n\u003ca id='snippet-PlaywrightPageUsage'\u003e\u003c/a\u003e\n```cs\nvar page = await browser.NewPageAsync();\nawait page.GotoAsync(\"http://localhost:5000\");\nawait Verify(page);\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.cs#L26-L32' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PlaywrightPageUsage' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nWith the state of the element being rendered as a verified files:\n\n\u003c!-- snippet: PlaywrightTests.PageUsage.verified.html --\u003e\n\u003ca id='snippet-PlaywrightTests.PageUsage.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\u003chtml lang=\"en\"\u003e\u003chead\u003e\n  \u003cmeta charset=\"utf-8\"\u003e\n  \u003ctitle\u003eThe Title\u003c/title\u003e\n  \u003clink href=\"https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css\" rel=\"stylesheet\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cdiv class=\"jumbotron\"\u003e\n    \u003ch1 class=\"display-4\"\u003eThe Awareness Of Relative Idealism\u003c/h1\u003e\n    \u003cp class=\"lead\"\u003e\n      One hears it stated that a factor within the logical radical priority embodies the\n      key principles behind the best practice marginalised certification project. The\n      logical prevalent remediation makes this disconcertingly inevitable, but it is\n      more likely that a metonymic reconstruction of the falsifiable religious baseline\n      stimulates the discipline of resource planning and generally represses the linear\n      constraints and the key business objectives.\n    \u003c/p\u003e\n    \u003ca id=\"someId\" class=\"btn btn-primary btn-lg\" href=\"#\" role=\"button\"\u003eLearn more\u003c/a\u003e\n  \u003c/div\u003e\n\n\u003c/body\u003e\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.PageUsage.verified.html#L1-L20' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PlaywrightTests.PageUsage.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n[PlaywrightTests.PageUsage.01.verified.png](/src/Tests/PlaywrightTests.PageUsage.verified.png):\n\n\u003cimg src=\"/src/Tests/PlaywrightTests.PageUsage.verified.png\" width=\"400px\"\u003e\n\n\n#### PageScreenshotOptions\n\n\u003c!-- snippet: PageScreenshotOptions --\u003e\n\u003ca id='snippet-PageScreenshotOptions'\u003e\u003c/a\u003e\n```cs\nvar page = await browser.NewPageAsync();\nawait page.GotoAsync(\"http://localhost:5000\");\nawait Verify(page)\n    .PageScreenshotOptions(\n        new()\n        {\n            Quality = 50,\n            Type = ScreenshotType.Jpeg\n        });\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.cs#L38-L50' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PageScreenshotOptions' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Element test\n\nAn element can be verified as follows:\n\n\u003c!-- snippet: PlaywrightElementUsage --\u003e\n\u003ca id='snippet-PlaywrightElementUsage'\u003e\u003c/a\u003e\n```cs\nvar page = await browser.NewPageAsync();\nawait page.GotoAsync(\"http://localhost:5000\");\nvar element = await page.QuerySelectorAsync(\"#someId\");\nawait Verify(element!);\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.cs#L56-L63' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PlaywrightElementUsage' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nWith the state of the element being rendered as a verified files:\n\n\u003c!-- snippet: PlaywrightTests.ElementUsage.verified.html --\u003e\n\u003ca id='snippet-PlaywrightTests.ElementUsage.verified.html'\u003e\u003c/a\u003e\n```html\nLearn more\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.ElementUsage.verified.html#L1-L1' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PlaywrightTests.ElementUsage.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n[PlaywrightTests.ElementUsage.01.verified.png](/src/Tests/PlaywrightTests.ElementUsage.verified.png):\n\n\u003cimg src=\"/src/Tests/PlaywrightTests.ElementUsage.verified.png\"\u003e\n\n\n#### ElementScreenshotOptions\n\n\u003c!-- snippet: ElementScreenshotOptions --\u003e\n\u003ca id='snippet-ElementScreenshotOptions'\u003e\u003c/a\u003e\n```cs\nvar page = await browser.NewPageAsync();\nawait page.GotoAsync(\"http://localhost:5000\");\nvar element = await page.QuerySelectorAsync(\"#someId\");\nawait Verify(element!)\n    .ElementScreenshotOptions(\n        new()\n        {\n            Quality = 50,\n            Type = ScreenshotType.Jpeg\n        });\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.cs#L80-L93' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-ElementScreenshotOptions' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n### Element test using ILocator\n\nAn element can be verified as follows:\n\n\u003c!-- snippet: PlaywrightLocatorUsage --\u003e\n\u003ca id='snippet-PlaywrightLocatorUsage'\u003e\u003c/a\u003e\n```cs\nvar page = await browser.NewPageAsync();\nawait page.GotoAsync(\"http://localhost:5000\");\nvar element = page.Locator(\"#someId\");\nawait Verify(element);\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.cs#L68-L75' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PlaywrightLocatorUsage' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nWith the state of the element being rendered as a verified files:\n\n\u003c!-- snippet: PlaywrightTests.LocatorUsage.verified.html --\u003e\n\u003ca id='snippet-PlaywrightTests.LocatorUsage.verified.html'\u003e\u003c/a\u003e\n```html\nLearn more\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.LocatorUsage.verified.html#L1-L1' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PlaywrightTests.LocatorUsage.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n[PlaywrightTests.LocatorUsage.01.verified.png](/src/Tests/PlaywrightTests.LocatorUsage.verified.png):\n\n\u003cimg src=\"/src/Tests/PlaywrightTests.LocatorUsage.verified.png\"\u003e\n\n\n#### LocatorScreenshotOptions\n\n\u003c!-- snippet: LocatorScreenshotOptions --\u003e\n\u003ca id='snippet-LocatorScreenshotOptions'\u003e\u003c/a\u003e\n```cs\nvar page = await browser.NewPageAsync();\nawait page.GotoAsync(\"http://localhost:5000\");\nvar element = page.Locator(\"#someId\");\nawait Verify(element)\n    .LocatorScreenshotOptions(\n        new()\n        {\n            Quality = 50,\n            Type = ScreenshotType.Jpeg\n        });\n```\n\u003csup\u003e\u003ca href='/src/Tests/PlaywrightTests.cs#L99-L112' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-LocatorScreenshotOptions' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n## Puppeteer Usage\n\nVerification of Web UIs via [Puppeteer](https://github.com/hardkoded/puppeteer-sharp)\n\n\n### NuGet package\n\nhttps://nuget.org/packages/Verify.Puppeteer/\n\n\n### Enable\n\nEnable VerifyPuppeteer once at assembly load time:\n\n\u003c!-- snippet: PuppeteerEnable --\u003e\n\u003ca id='snippet-PuppeteerEnable'\u003e\u003c/a\u003e\n```cs\n[ModuleInitializer]\npublic static void InitPuppeteer() =\u003e\n    VerifyPuppeteer.Initialize();\n```\n\u003csup\u003e\u003ca href='/src/Tests/ModuleInitializer.cs#L19-L25' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PuppeteerEnable' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Instantiate browser\n\n\u003c!-- snippet: PuppeteerBuild --\u003e\n\u003ca id='snippet-PuppeteerBuild'\u003e\u003c/a\u003e\n```cs\n// wait for target server to start\nawait SocketWaiter.Wait(port: 5000);\n\nvar fetcher = new BrowserFetcher(SupportedBrowser.Chrome);\nawait fetcher.DownloadAsync();\n\nbrowser = await Puppeteer.LaunchAsync(\n    new()\n    {\n        Headless = true\n    });\n```\n\u003csup\u003e\u003ca href='/src/Tests/PuppeteerTests.cs#L11-L25' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PuppeteerBuild' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Page test\n\nThe current page state can be verified as follows:\n\n\u003c!-- snippet: PuppeteerPageUsage --\u003e\n\u003ca id='snippet-PuppeteerPageUsage'\u003e\u003c/a\u003e\n```cs\nvar page = await browser.NewPageAsync();\npage.Viewport.Width = 1024;\npage.Viewport.Height = 768;\nawait page.GoToAsync(\"http://localhost:5000\");\nawait Verify(page);\n```\n\u003csup\u003e\u003ca href='/src/Tests/PuppeteerTests.cs#L31-L39' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PuppeteerPageUsage' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nWith the state of the element being rendered as a verified files:\n\n\u003c!-- snippet: PuppeteerTests.PageUsage.verified.html --\u003e\n\u003ca id='snippet-PuppeteerTests.PageUsage.verified.html'\u003e\u003c/a\u003e\n```html\n\u003c!DOCTYPE html\u003e\u003chtml lang=\"en\"\u003e\u003chead\u003e\n  \u003cmeta charset=\"utf-8\"\u003e\n  \u003ctitle\u003eThe Title\u003c/title\u003e\n  \u003clink href=\"https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css\" rel=\"stylesheet\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cdiv class=\"jumbotron\"\u003e\n    \u003ch1 class=\"display-4\"\u003eThe Awareness Of Relative Idealism\u003c/h1\u003e\n    \u003cp class=\"lead\"\u003e\n      One hears it stated that a factor within the logical radical priority embodies the\n      key principles behind the best practice marginalised certification project. The\n      logical prevalent remediation makes this disconcertingly inevitable, but it is\n      more likely that a metonymic reconstruction of the falsifiable religious baseline\n      stimulates the discipline of resource planning and generally represses the linear\n      constraints and the key business objectives.\n    \u003c/p\u003e\n    \u003ca id=\"someId\" class=\"btn btn-primary btn-lg\" href=\"#\" role=\"button\"\u003eLearn more\u003c/a\u003e\n  \u003c/div\u003e\n\n\u003c/body\u003e\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/PuppeteerTests.PageUsage.verified.html#L1-L20' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PuppeteerTests.PageUsage.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n[PuppeteerTests.PageUsage.01.verified.png](/src/Tests/PuppeteerTests.PageUsage.verified.png):\n\n\u003cimg src=\"/src/Tests/PuppeteerTests.PageUsage.verified.png\" width=\"400px\"\u003e\n\n\n### Element test\n\nAn element can be verified as follows:\n\n\u003c!-- snippet: PuppeteerElementUsage --\u003e\n\u003ca id='snippet-PuppeteerElementUsage'\u003e\u003c/a\u003e\n```cs\nvar page = await browser.NewPageAsync();\nawait page.GoToAsync(\"http://localhost:5000\");\nvar element = await page.QuerySelectorAsync(\"#someId\");\nawait Verify(element);\n```\n\u003csup\u003e\u003ca href='/src/Tests/PuppeteerTests.cs#L45-L52' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PuppeteerElementUsage' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nWith the state of the element being rendered as a verified files:\n\n\u003c!-- snippet: PuppeteerTests.ElementUsage.verified.html --\u003e\n\u003ca id='snippet-PuppeteerTests.ElementUsage.verified.html'\u003e\u003c/a\u003e\n```html\nLearn more\n```\n\u003csup\u003e\u003ca href='/src/Tests/PuppeteerTests.ElementUsage.verified.html#L1-L1' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-PuppeteerTests.ElementUsage.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n[PuppeteerTests.ElementUsage.01.verified.png](/src/Tests/PuppeteerTests.ElementUsage.verified.png):\n\n\u003cimg src=\"/src/Tests/PuppeteerTests.ElementUsage.verified.png\"\u003e\n\n\n## Selenium Usage\n\nVerification of Web UIs via [Selenium](https://www.selenium.dev).\n\n\n### NuGet package\n\nhttps://nuget.org/packages/Verify.Selenium/\n\n\n### Enable\n\nEnable VerifySelenium once at assembly load time:\n\n\u003c!-- snippet: SeleniumEnable --\u003e\n\u003ca id='snippet-SeleniumEnable'\u003e\u003c/a\u003e\n```cs\n[ModuleInitializer]\npublic static void InitSelenium() =\u003e\n    VerifySelenium.Initialize();\n```\n\u003csup\u003e\u003ca href='/src/Tests/ModuleInitializer.cs#L3-L9' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-SeleniumEnable' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Instantiate browser\n\n\u003c!-- snippet: SeleniumBuildDriver --\u003e\n\u003ca id='snippet-SeleniumBuildDriver'\u003e\u003c/a\u003e\n```cs\n// wait for target server to start\nawait SocketWaiter.Wait(port: 5000);\n\nvar options = new ChromeOptions();\noptions.AddArgument(\"--no-sandbox\");\noptions.AddArgument(\"--headless\");\ndriver = new(options);\ndriver.Manage().Window.Size = new(1024, 768);\ndriver.Navigate().GoToUrl(\"http://localhost:5000\");\n```\n\u003csup\u003e\u003ca href='/src/Tests/SeleniumTests.cs#L13-L25' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-SeleniumBuildDriver' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n### Page test\n\nThe current page state can be verified as follows:\n\n\u003c!-- snippet: SeleniumPageUsage --\u003e\n\u003ca id='snippet-SeleniumPageUsage'\u003e\u003c/a\u003e\n```cs\nawait Verify(driver);\n```\n\u003csup\u003e\u003ca href='/src/Tests/SeleniumTests.cs#L31-L35' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-SeleniumPageUsage' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nWith the state of the element being rendered as a verified files:\n\n\u003c!-- snippet: SeleniumTests.PageUsage.verified.html --\u003e\n\u003ca id='snippet-SeleniumTests.PageUsage.verified.html'\u003e\u003c/a\u003e\n```html\n\u003chtml lang=\"en\"\u003e\u003chead\u003e\n  \u003cmeta charset=\"utf-8\"\u003e\n  \u003ctitle\u003eThe Title\u003c/title\u003e\n  \u003clink href=\"https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css\" rel=\"stylesheet\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cdiv class=\"jumbotron\"\u003e\n    \u003ch1 class=\"display-4\"\u003eThe Awareness Of Relative Idealism\u003c/h1\u003e\n    \u003cp class=\"lead\"\u003e\n      One hears it stated that a factor within the logical radical priority embodies the\n      key principles behind the best practice marginalised certification project. The\n      logical prevalent remediation makes this disconcertingly inevitable, but it is\n      more likely that a metonymic reconstruction of the falsifiable religious baseline\n      stimulates the discipline of resource planning and generally represses the linear\n      constraints and the key business objectives.\n    \u003c/p\u003e\n    \u003ca id=\"someId\" class=\"btn btn-primary btn-lg\" href=\"#\" role=\"button\"\u003eLearn more\u003c/a\u003e\n  \u003c/div\u003e\n\n\u003c/body\u003e\u003c/html\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/SeleniumTests.PageUsage.verified.html#L1-L20' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-SeleniumTests.PageUsage.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n[SeleniumTests.PageUsage.01.verified.png](/src/Tests/SeleniumTests.PageUsage.verified.png):\n\n\u003cimg src=\"/src/Tests/SeleniumTests.PageUsage.verified.png\" width=\"400px\"\u003e\n\n\n### Element test\n\nAn element can be verified as follows:\n\n\u003c!-- snippet: SeleniumElementUsage --\u003e\n\u003ca id='snippet-SeleniumElementUsage'\u003e\u003c/a\u003e\n```cs\nvar element = driver.FindElement(By.Id(\"someId\"));\nawait Verify(element);\n```\n\u003csup\u003e\u003ca href='/src/Tests/SeleniumTests.cs#L41-L46' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-SeleniumElementUsage' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nWith the state of the element being rendered as a verified files:\n\n\u003c!-- snippet: SeleniumTests.ElementUsage.verified.html --\u003e\n\u003ca id='snippet-SeleniumTests.ElementUsage.verified.html'\u003e\u003c/a\u003e\n```html\n\u003ca id=\"someId\" class=\"btn btn-primary btn-lg\" href=\"#\" role=\"button\"\u003eLearn more\u003c/a\u003e\n```\n\u003csup\u003e\u003ca href='/src/Tests/SeleniumTests.ElementUsage.verified.html#L1-L1' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-SeleniumTests.ElementUsage.verified.html' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n[SeleniumTests.ElementUsage.01.verified.png](/src/Tests/SeleniumTests.ElementUsage.verified.png):\n\n\u003cimg src=\"/src/Tests/SeleniumTests.ElementUsage.verified.png\"\u003e\n\n\n## OS specific rendering\n\nThe rendering can very slightly between different OS versions. This can make verification on different machines (eg CI) problematic. A [custom comparer](https://github.com/VerifyTests/Verify/blob/master/docs/comparer.md) can to mitigate this.\n\n\n## Icon\n\n[Crystal](https://thenounproject.com/term/crystal/1440050/) designed by [Monjin Friends](https://thenounproject.com/monjin.friends) from [The Noun Project](https://thenounproject.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.headlessbrowsers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverifytests%2Fverify.headlessbrowsers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.headlessbrowsers/lists"}