{"id":30743467,"url":"https://github.com/ukho/uiautomationframework","last_synced_at":"2026-02-25T10:40:38.066Z","repository":{"id":101503660,"uuid":"200015888","full_name":"UKHO/UIAutomationFramework","owner":"UKHO","description":"The automation framework is intended to help automate the browser for automated tests. It's intended to work with SpecFlow, and by default uses Selenium as the web driver.","archived":false,"fork":false,"pushed_at":"2025-02-21T08:46:00.000Z","size":2265,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-01T07:03:31.333Z","etag":null,"topics":["chrome","chromedriver","selenium","specflow","specflow3"],"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/UKHO.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}},"created_at":"2019-08-01T09:02:08.000Z","updated_at":"2025-03-08T03:51:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"1112167b-28a1-46b2-be06-04795b9a276c","html_url":"https://github.com/UKHO/UIAutomationFramework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UKHO/UIAutomationFramework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKHO%2FUIAutomationFramework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKHO%2FUIAutomationFramework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKHO%2FUIAutomationFramework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKHO%2FUIAutomationFramework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UKHO","download_url":"https://codeload.github.com/UKHO/UIAutomationFramework/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UKHO%2FUIAutomationFramework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273539317,"owners_count":25123499,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chrome","chromedriver","selenium","specflow","specflow3"],"created_at":"2025-09-04T02:07:28.267Z","updated_at":"2026-02-25T10:40:38.028Z","avatar_url":"https://github.com/UKHO.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://ukhogov.visualstudio.com/Pipelines/_apis/build/status/UKHO.UIAutomationFramework?branchName=master)](https://ukhogov.visualstudio.com/Pipelines/_build/latest?definitionId=101\u0026branchName=master)\n\n# UKHO Browser Automation Framework\n\nThe automation framework is intended to help automate the browser for automated tests. It's intended to work with SpecFlow, and by default uses Selenium as the web driver.\n\n## Quick Start Guide\n\n Include the NuGet package in your SpecFlow project:\n\n```powershell\nInstall-Package UKHO.UIAutomationFramework\n```\n\n You then need to ensure SpecFlow is looking in the framework assembly for bindings. Ensure it’s added to the spec projects App.config:\n\n```xml\n\u003cspecFlow\u003e\n    \u003cstepAssemblies\u003e\n        \u003cstepAssembly assembly=\"UKHO.SpecflowSessionDependencyInjection\" /\u003e\n    \u003c/stepAssemblies\u003e\n\u003c/specFlow\u003e\n```\n\nYou specify a number of other settings in the app config for the base URL, etc:\n\n```xml\n\u003cappSettings\u003e\n    \u003cadd key=\"BaseAddress\" value=\"http://localhost:12881/\" /\u003e\n    \u003cadd key=\"Browser\" value=\"Chrome\" /\u003e\n    \u003cadd key=\"ForceUseJsAlertCode\" value=\"true\" /\u003e\n    \u003cadd key=\"ReuseSession\" value=\"false\" /\u003e\n    \u003cadd key=\"websiteBaseAddress\" value=\"http://localhost:12881/\" /\u003e\n    \u003cadd key=\"FirefoxPath\" value=\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" /\u003e\n\u003c/appSettings\u003e\n```\n\nThese settings are as follows:\n\n| Setting | Value  |\n|---------|--------|\n| BaseAddress | This is where the browser will start |\n| Browser | This is the browser that the |\n\nYou then need to provide a session factory and register it with SpecFlow’s DI:\n\n```C#\n    internal class FMSessionFactory : ISessionFactory\n    {\n        public BaseSession CreateSession(string testTitle)\n        {\n            var fmSession = new FMSession(testTitle);\n            fmSession.WebDriver.WindowSize = new Size(1280, 1024);\n            return fmSession;\n        }\n    }\n\n    [Binding]\n    // ReSharper disable once InconsistentNaming\n    public class FMWebDriverSupport\n    {\n        private readonly IObjectContainer objectContainer;\n\n        public FMWebDriverSupport(IObjectContainer objectContainer)\n        {\n            this.objectContainer = objectContainer;\n        }\n\n        [BeforeScenario]\n        public void InitializeWebDriver()\n        {\n            var sessionInstance = new FMSessionFactory();\n            objectContainer.RegisterInstanceAs\u003cISessionFactory\u003e(sessionInstance);\n       }\n\n        public static string BaseUrl =\u003e ConfigurationManager.AppSettings[\"BaseAddress\"];\n    }\n```\n\nOnce you’ve done this, you should be able to inject ```ISession``` into any page object model and work with it.\n\ne.g. (NB, I’ve copied a subset, compiler will tell you if you need to implement more methods).\n\n```C#\npublic class RecoverPasswordPage : PageBase\n{\n    private readonly ISession session;\n\n    public RecoverPasswordPage(ISession session)\n        : base(session)\n    {\n    }\n\n    protected override string PageId =\u003e \"MasterBody\";\n\n    protected override string ExpectedPageTitle =\u003e \"Recover your password\";\n\n    public override void GoTo()\n    {\n        throw new NotImplementedException();// How to get to the page, e.g. Session.WebDriver.GoToUrl(\"~/Catalog/Geo\"); Usually, not required\n    }\n\n    public bool ValidatePasswordPage()\n    {\n        return IsAt;\n    }\n}\n```\n\n## Security Disclosure\n\nThe UK Hydrographic Office (UKHO) collects and supplies hydrographic and geospatial data for the merchant shipping and the Royal Navy, to protect lives at sea. Maintaining the confidentially, integrity and availability of our services is paramount. Found a security bug? You might be saving a life by reporting it to us at UKHO-ITSO@ukho.gov.uk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukho%2Fuiautomationframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fukho%2Fuiautomationframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukho%2Fuiautomationframework/lists"}