{"id":24380767,"url":"https://github.com/lzinga/autoweb","last_synced_at":"2025-04-10T23:05:17.240Z","repository":{"id":52624034,"uuid":"353532525","full_name":"lzinga/AutoWeb","owner":"lzinga","description":"An easy to use Selenium wrapper for page automations.","archived":false,"fork":false,"pushed_at":"2021-04-23T00:09:36.000Z","size":749,"stargazers_count":7,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T23:05:06.518Z","etag":null,"topics":["automation","browser","html","selenium","web-driver","webdriver"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lzinga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["lzinga"]}},"created_at":"2021-04-01T01:02:54.000Z","updated_at":"2021-06-02T20:08:12.000Z","dependencies_parsed_at":"2022-08-30T12:02:01.764Z","dependency_job_id":null,"html_url":"https://github.com/lzinga/AutoWeb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzinga%2FAutoWeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzinga%2FAutoWeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzinga%2FAutoWeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzinga%2FAutoWeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lzinga","download_url":"https://codeload.github.com/lzinga/AutoWeb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312145,"owners_count":21082638,"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":["automation","browser","html","selenium","web-driver","webdriver"],"created_at":"2025-01-19T08:29:02.026Z","updated_at":"2025-04-10T23:05:17.220Z","avatar_url":"https://github.com/lzinga.png","language":"C#","readme":"\u003ch1 align=\"center\"\u003e\n    AutoWeb\n\u003c/h1\u003e\n\u003ch6 align=\"center\"\u003e\n    Created by: \u003ca href=\"https://github.com/lzinga\" target=\"_blank\"\u003eLucas Elzinga\u003c/a\u003e\n\u003c/h6\u003e\n\n\u003cp align=\"center\"\u003eThis library wraps the \u003ca href=\"https://github.com/SeleniumHQ/selenium\" target=\"_blank\"\u003eSelenium\u003c/a\u003e library into an easy to use library for any\nautomated tasks you may require in the browser.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.nuget.org/packages/AutoWeb/\" title=\"Nuget\"\u003e\u003cimg src=\"https://img.shields.io/nuget/v/AutoWeb?style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.nuget.org/packages/AutoWeb/\" title=\"Package Building\"\u003e\u003cimg src=\"https://img.shields.io/github/workflow/status/lzinga/autoweb/Build-Packages/main?style=for-the-badge\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/lzinga/AutoWeb/actions/workflows/run-tests.yml\" title=\"Unit Tests\"\u003e\u003cimg src=\"https://img.shields.io/github/workflow/status/lzinga/autoweb/Run-Tests/main?label=Tests\u0026style=for-the-badge\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/lzinga?tab=packages\u0026repo_name=AutoWeb\" title=\"GitHub Package\"\u003e\u003cimg src=\"https://img.shields.io/github/workflow/status/lzinga/autoweb/Build-Packages/main?label=Packaging\u0026style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/lzinga/AutoWeb/blob/main/LICENSE\" title=\"License\"\u003e\u003cimg src=\"https://img.shields.io/github/license/lzinga/AutoWeb?style=for-the-badge\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/lzinga/AutoWeb/discussions\" title=\"Discussions\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=Community\u0026message=Discussions\u0026style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Why?\nThere were many times I wanted to create a quick project that would automate a process I do often, or tasks that are cumbersome and annoying. However from my experience\nSelenium had quite a bit of overhead and can feel clunky/messy if you wanted to spin up something quickly. So here we are.\n\nAs an example I have to open tickets in part of my job in a system that is __not__ user friendly, does not give access to API, nor was it built with my group in mind. Alas we are still required to open tickets in said system. So... I will be using this library to automate the process to be much simpler and quicker for my team. I leave you with the hopes that this library can help in some way or another.\n\n## Quick Links\n1. [Wiki Documentation](https://github.com/lzinga/AutoWeb/wiki)\n\n## Usage\n\n__Only basic usage is the readme, view the wiki for more detailed information.__\n\nTo properly load and open a browser you will need to include a web driver, by default\nAutoWeb uses [Selenium.WebDriver.MSEdgeDriver](https://www.nuget.org/packages/Selenium.WebDriver.MSEdgeDriver/89.0.774.54)\nas the default driver but you can view the [#tested-browsers](Tested Browsers). I have not tested with other browsers but it should be possible with some slight modifications.\n\nAutoWeb uses a `PageCollection` object to add and manage your pages.\n```csharp\n// Creates a default page collection. (uses msedgedriver)\nnew PageCollection();\n\n// Creates a page collection with configured options.\nnew PageCollection(options =\u003e {\n\n    // Option #1\n    // Option to specify a different browser.\n    options.Browser\u003cIBrowser\u003e(\"chromedriver.exe\")\n\n    // Option #2\n    // Option to specify all options for the browser\n    options.Browser\u003cChromeBrowser\u003e(opts =\u003e {\n        opts.Driver = \"chromedriver.exe\";\n        opts.Timeout = new TimeSpan(0, 0, 30);\n        opts.Arguments = new string[] {\n            \"--headless\"\n        };\n    });\n\n    // At times the driver will remain running in the background, this will\n    // attempt to clear them before starting a new one.\n    options.CleanOrphanedDrivers = true,\n});\n```\n\nOnce created you can add pages later or directly off the new object itself. Either of these methods are fine.\n```csharp\nnew PageCollection()\n    .AddPage\u003cLoginPage\u003e()\n    .AddPage\u003cRepositoryPage\u003e();\n\nvar pages = new PageCollection();\npages.Add\u003cLoginPage\u003e();\n```\n\nOnce you have pages added to your collection you can execute them individually,\nor all in the order they were added.\n```csharp\n// This will execute all pages starting at LoginPage and continuing to RepositoryPage\nnew PageCollection()\n    .AddPage\u003cLoginPage\u003e()\n    .AddPage\u003cRepositoryPage\u003e()\n    .Execute()\n\n// If executing against the variable itself you can execute a singular page.\npages.Execute\u003cLoginPage\u003e();\n\n```\n\n## Fluent Control\nWhen writing automation for a page things can get messy pretty quickly if the website has you jump\naround a lot. You can chain commands like in the example below.\n```csharp\nbrowser.FindElement(Where.XPath, \"//*[@id='sp_formfield_search']\")\n    .SendKeys(\"TicketVM01\")\n    .Wait(1000)\n    .ThenFindElement(Where.XPath, \"//*[@id='Add']/div/span/div/div/div[2]/input[2]\")\n    .Click();\n```\n\n# Supported Drivers\nThe following browser drivers have been tested and currently built into unit tests.\n\n1. [Selenium.WebDriver.MSEdgeDriver](https://www.nuget.org/packages/Selenium.WebDriver.MSEdgeDriver)\n1. [Selenium.WebDriver.ChromeDriver](https://www.nuget.org/packages/Selenium.WebDriver.ChromeDriver)\n","funding_links":["https://github.com/sponsors/lzinga"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzinga%2Fautoweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flzinga%2Fautoweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzinga%2Fautoweb/lists"}