{"id":25666334,"url":"https://github.com/vrknetha/playwright-dotnet","last_synced_at":"2025-08-09T05:09:42.344Z","repository":{"id":278133642,"uuid":"908997286","full_name":"vrknetha/playwright-dotnet","owner":"vrknetha","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-18T06:35:51.000Z","size":331,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T07:32:28.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vrknetha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2024-12-27T13:48:03.000Z","updated_at":"2024-12-27T13:52:35.000Z","dependencies_parsed_at":"2025-02-18T07:42:57.692Z","dependency_job_id":null,"html_url":"https://github.com/vrknetha/playwright-dotnet","commit_stats":null,"previous_names":["vrknetha/playwright-dotnet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrknetha%2Fplaywright-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrknetha%2Fplaywright-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrknetha%2Fplaywright-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrknetha%2Fplaywright-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrknetha","download_url":"https://codeload.github.com/vrknetha/playwright-dotnet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240444158,"owners_count":19802173,"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":"2025-02-24T08:29:38.196Z","updated_at":"2025-02-24T08:29:38.910Z","avatar_url":"https://github.com/vrknetha.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Playwright .NET Test Automation Framework\n\nA robust and scalable test automation framework built with Playwright for .NET, featuring comprehensive reporting, logging, and configuration management.\n\n## Features\n\n- **Cross-browser Testing**: Support for Chromium, Firefox, and WebKit\n- **Parallel Test Execution**: MSTest-based parallel test execution\n- **Rich Reporting**: HTML reports with videos, traces, and logs\n- **Configuration Management**: Environment-based configuration\n- **Logging**: Comprehensive logging with different levels\n- **Page Object Model**: Structured and maintainable test architecture\n- **Tracing**: Built-in Playwright trace viewer support\n- **Video Recording**: Automatic video recording of test executions\n\n## Prerequisites\n\n- [.NET 9.0 SDK](https://dotnet.microsoft.com/download)\n- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or [Visual Studio Code](https://code.visualstudio.com/)\n- [PowerShell](https://docs.microsoft.com/en-us/powershell/) (for running Playwright installation scripts)\n\n## Getting Started\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/vrknetha/playwright-dotnet.git\n   cd playwright-dotnet\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   dotnet restore\n   ```\n\n3. Install Playwright browsers:\n\n   ```bash\n   pwsh bin/Debug/net9.0/playwright.ps1 install\n   ```\n\n4. Build the solution:\n\n   ```bash\n   dotnet build\n   ```\n\n5. Run the tests:\n   ```bash\n   dotnet test\n   ```\n\n## Project Structure\n\n```\n├── Infrastructure/\n│   ├── Base/               # Base classes for tests and page objects\n│   ├── Config/             # Configuration management\n│   ├── Reporting/          # Test reporting infrastructure\n│   ├── Tracing/           # Playwright tracing setup\n│   └── UI/                # UI interaction helpers\n├── Pages/                 # Page Object Models\n├── Tests/                 # Test classes\n├── TestResults/          # Test execution results\n│   └── Reports/          # HTML reports with artifacts\n└── appsettings.json      # Application configuration\n```\n\n## Configuration\n\nThe framework uses `appsettings.json` for configuration:\n\n```json\n{\n  \"TestSettings\": {\n    \"Browser\": {\n      \"Name\": \"chromium\",\n      \"Headless\": false,\n      \"SlowMo\": 0,\n      \"Viewport\": {\n        \"Width\": 1920,\n        \"Height\": 1080\n      }\n    },\n    \"Trace\": {\n      \"Enabled\": true,\n      \"Mode\": \"Always\",\n      \"Screenshots\": true,\n      \"Snapshots\": true,\n      \"Sources\": true\n    }\n  }\n}\n```\n\n## Writing Tests\n\nExample test using the framework:\n\n```csharp\n[TestClass]\npublic class SampleTest : TestBase\n{\n    [TestMethod]\n    public async Task NavigationTest()\n    {\n        // Arrange\n        await Page.GotoAsync(\"https://playwright.dev\");\n\n        // Act\n        await Page.ClickAsync(\"text=Get Started\");\n\n        // Assert\n        await Expect(Page).ToHaveURLAsync(\"**/docs/intro\");\n    }\n}\n```\n\n## Test Reports\n\nAfter test execution, you can find the following artifacts in the `TestResults/Reports` directory:\n\n- HTML report (`index.html`)\n- Test videos (`.webm` files)\n- Playwright traces (`.zip` files)\n- Test logs (`.log` files)\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrknetha%2Fplaywright-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrknetha%2Fplaywright-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrknetha%2Fplaywright-dotnet/lists"}