{"id":42956401,"url":"https://github.com/phaetto/selenium-reinforcement-learning","last_synced_at":"2026-01-30T22:17:14.713Z","repository":{"id":41898142,"uuid":"221869514","full_name":"phaetto/selenium-reinforcement-learning","owner":"phaetto","description":"Training selenium agents to simplify UI navigation and reliability","archived":false,"fork":false,"pushed_at":"2023-09-20T13:32:23.000Z","size":76087,"stargazers_count":23,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-09-21T02:58:53.465Z","etag":null,"topics":["machine-learning","reinforcement-learning","selenium","selenium-webdriver","ui-testing"],"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/phaetto.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":null,"security":null,"support":null}},"created_at":"2019-11-15T07:35:19.000Z","updated_at":"2023-09-19T13:05:38.000Z","dependencies_parsed_at":"2022-08-11T20:31:40.886Z","dependency_job_id":null,"html_url":"https://github.com/phaetto/selenium-reinforcement-learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/phaetto/selenium-reinforcement-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaetto%2Fselenium-reinforcement-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaetto%2Fselenium-reinforcement-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaetto%2Fselenium-reinforcement-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaetto%2Fselenium-reinforcement-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phaetto","download_url":"https://codeload.github.com/phaetto/selenium-reinforcement-learning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phaetto%2Fselenium-reinforcement-learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28920801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T20:25:28.696Z","status":"ssl_error","status_checked_at":"2026-01-30T20:25:13.426Z","response_time":66,"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":["machine-learning","reinforcement-learning","selenium","selenium-webdriver","ui-testing"],"created_at":"2026-01-30T22:17:14.010Z","updated_at":"2026-01-30T22:17:14.707Z","avatar_url":"https://github.com/phaetto.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Selenium Reinforcement Learning\n\nWe have to change the way we are doing testing and integrate smarter tools in\n    our everyday workflows.\n\nUI tests are hard to write, flaky, with minimum explainability and hard to maintain.\nBut on the other hand are easy to formulate and reason in high level.\n\nI strongly believe that all the above can be simplified by introducing user-guided\n    AI/ML algorithms in between.\n\n## Goals\n\n### UI Tests are hard to write\nThis repository attempts to solve this using AI (reinforcement learning) to\n    provide an automatic way of discovering the path of actions that are need to be\n    taken to reach a goal (the element under test).\n\nIt does that with a training process on a goal and then running the test with the\n    trained guidance.\n\n### Flaky tests\nThe best way to decrease flaky tests is to increase explainability and manage those edge cases.\nThis will allow to map the ones that are problems because of f.ex. network and\n    retry the test until the systems around the system under test are stable.\nThis repo will try to provide a framework for reliable error identification to\n    tackle this issue, probably involving some ML.\n\n### Hard to maintain\nUI tests needs updates correlated to almost any UI change - CSS, JS, HTML even when\n    using the best practices.\nThis is almost eliminated due to te fact when you train a UI test, it manages to\n    find each own way to the goal.\nThe next challenge here is to be able to find out when to train again, and how to \n    create an efficient process around that is continuous-deployment and DevOps friendly.\n\n### In detail\nIn detail, the goals of the project are:\n- Create a framework that abstracts trainable steps with composite step tests\n- Provide tooling that trains/replays workflows without breaking your UI tests\n- Provide ordering logic\n- Be extremely reliable either when training or stepping forward from a matrix\n- Provide an error module that can reliably provide error reporting during training\n- Performance: Training should be fast as possible\n- Be pipeline and DevOps process friendly\n\n## Reinforcement Learning\n\nThe algorithm used for training is Q-Learning. It creates a discreet Q Matrix using a\n    set of predefined actions and rules to achieve a goal as fast as possible.\n\nYou can learn more about the actual algorithm at\n    [wikipedia](https://en.wikipedia.org/wiki/Q-learning).\n\n### Why Q-Learning?\n\nQ-Learning has the advantage that works really well in discrete state and action space,\n    exactly what a user is doing on a page.\n\nFor this to work correctly this repo is\n    ignoring the timing dimension (because that is included in the state in browser systems)\n    and replaces that with \"user wait\" mechanic.\n\n## Example\n\nThere is a full [end to end example](Selenium.ReinforcementLearning.Framework.Examples.UnitTests/Index_EndToEndOrder.cs)\nthat you can see this in action. Just run the tests marked at 1,2,3 in consecutive order and watch how the trained output is been used to navigate the site.\n\nYou can debug the tests in order to see the algorithm in action in the local chromium browser.\n\n## Feedback\n\nIf you have any questions and/or feedback feel free to create an issue/discussion.\n\n## License\n\nThe code is licensed under [Apache 2.0 license](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaetto%2Fselenium-reinforcement-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphaetto%2Fselenium-reinforcement-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphaetto%2Fselenium-reinforcement-learning/lists"}