{"id":13599473,"url":"https://github.com/adamdriscoll/selenium-powershell","last_synced_at":"2025-04-04T17:10:26.630Z","repository":{"id":44454359,"uuid":"107920842","full_name":"adamdriscoll/selenium-powershell","owner":"adamdriscoll","description":"PowerShell module to run a Selenium WebDriver. ","archived":false,"fork":false,"pushed_at":"2023-08-29T00:36:29.000Z","size":183136,"stargazers_count":470,"open_issues_count":34,"forks_count":103,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-03-28T16:11:28.707Z","etag":null,"topics":["powershell","selenium","web-testing"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","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/adamdriscoll.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-10-23T02:08:12.000Z","updated_at":"2025-03-05T06:08:51.000Z","dependencies_parsed_at":"2024-04-13T03:49:16.273Z","dependency_job_id":null,"html_url":"https://github.com/adamdriscoll/selenium-powershell","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamdriscoll%2Fselenium-powershell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamdriscoll%2Fselenium-powershell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamdriscoll%2Fselenium-powershell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamdriscoll%2Fselenium-powershell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamdriscoll","download_url":"https://codeload.github.com/adamdriscoll/selenium-powershell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217222,"owners_count":20903009,"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":["powershell","selenium","web-testing"],"created_at":"2024-08-01T17:01:04.774Z","updated_at":"2025-04-04T17:10:26.614Z","avatar_url":"https://github.com/adamdriscoll.png","language":"PowerShell","readme":"# Selenium PowerShell Module\r\n\r\nThe Selenium PowerShell module allows you to automate browser interaction using the [Selenium API](https://selenium.dev/). You can navigate to pages, find elements, click buttons, enter text and even take screenshots. \r\n\r\n# Looking for Maintainers\r\n\r\nI haven't been able to able to keep up with the issues on this repo. If you are interested in becoming a maintainer, please let me know. - [Adam](https://github.com/adamdriscoll)\r\n\r\n# About\r\n\r\n- Wraps the C# WebDriver for Selenium\r\n- Easily execute web-based tests\r\n- Works well with Pester\r\n\r\n[![Build Status](https://adamrdriscoll.visualstudio.com/Selenium/_apis/build/status/adamdriscoll.selenium-powershell?branchName=master)](https://adamrdriscoll.visualstudio.com/Selenium/_build/latest?definitionId=25\u0026branchName=master)\r\n\r\n# Installation\r\n`Note: Firefox's Latest Gecko Driver on Windows requires Microsoft Visual Studio Redistributables for the binary to run get them `[Here](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)\r\n\r\n\r\n```powershell\r\nInstall-Module Selenium\r\n```\r\n\r\nOR\r\n\r\n```\r\nImport-Module \"{FullPath}\\selenium-powershell\\Selenium.psd1\"\r\n```\r\n\r\n# Usage\r\n`Note: in order to use a specific driver you will need to have the brower of the driver installed on your system.\r\nFor example if you use Start-SeChrome you will need to have either a Chrome or Chromium browser installed\r\n`\r\n\r\n## Start a Browser Driver\r\n```powershell\r\n# Start a driver for a browser of your choise (Chrome/Firefox/Edge/InternetExplorer)\r\n# To start a Firefox Driver\r\n$Driver = Start-SeFirefox \r\n\r\n# To start a Chrome Driver\r\n$Driver = Start-SeChrome\r\n\r\n# To start an Edge Driver\r\n$Driver = Start-SeEdge\r\n```\r\n\r\n## Navigate to a URL\r\n\r\n```powershell\r\n$Driver = Start-SeFirefox \r\nEnter-SeUrl https://www.poshud.com -Driver $Driver\r\n```\r\n\r\n## Find an Element\r\n\r\n```powershell\r\n$Driver = Start-SeFirefox \r\nEnter-SeUrl https://www.poshud.com -Driver $Driver\r\n$Element = Find-SeElement -Driver $Driver -Id \"myControl\"\r\n```\r\n\r\n## Click on an Element/Button\r\n\r\n```powershell\r\n$Driver = Start-SeFirefox \r\nEnter-SeUrl https://www.poshud.com -Driver $Driver\r\n$Element = Find-SeElement -Driver $Driver -Id \"btnSend\"\r\nInvoke-SeClick -Element $Element\r\n```\r\n\r\n## Send Keystrokes\r\n\r\n```powershell\r\n$Driver = Start-SeFirefox \r\nEnter-SeUrl https://www.poshud.com -Driver $Driver\r\n$Element = Find-SeElement -Driver $Driver -Id \"txtEmail\"\r\nSend-SeKeys -Element $Element -Keys \"adam@poshtools.com\"\r\n```\r\n\r\n## Run Chrome with options\r\n\r\n```powershell\r\n# Run Chrome in Headless mode \r\n$Driver = Start-SeChrome -Headless\r\n\r\n# Run Chrome in incognito mode\r\n$Driver = Start-SeChrome -Incognito\r\n\r\n# Run Chrome with alternative download folder\r\n$Driver = Start-SeChrome -DefaultDownloadPath C:\\Temp\r\n\r\n# Run Chrome and go to a URL in one command\r\n$Driver = Start-SeChrome -StartURL 'https://www.google.com/ncr'\r\n\r\n# Run Chrome with multiple Arguments\r\n$Driver = Start-SeChrome -Arguments @('Incognito','start-maximized')\r\n\r\n# Run Chrome with an existing profile.\r\n# The default profile paths are as follows:\r\n# Windows: C:\\Users\\\u003cusername\u003e\\AppData\\Local\\Google\\Chrome\\User Data\r\n# Linux: /home/\u003cusername\u003e/.config/google-chrome\r\n# MacOS: /Users/\u003cusername\u003e/Library/Application Support/Google/Chrome\r\n$Driver = Start-SeChrome -ProfileDirectoryPath '/home/\u003cusername\u003e/.config/google-chrome'\r\n\r\n```\r\n\r\n## Find and Wait for an element\r\n```powershell\r\n$Driver = Start-SeChrome\r\nEnter-SeUrl 'https://www.google.com/ncr' -Driver $Driver\r\n\r\n# Please note that with the -Wait parameter only one element can be returned at a time.\r\nFind-SeElement -Driver $d -Wait -Timeout 10 -Css input[name='q'] \r\nFind-SeElement -Driver $d -Wait -Timeout 10 -Name q \r\n```\r\n\r\n# Maintainers \r\n\r\n- [Adam Driscoll](https://github.com/adamdriscoll)\r\n- [Avri Chen-Roth](https://github.com/the-mentor)\r\n- [Francis Mercier](https://github.com/itfranck)\r\n","funding_links":[],"categories":["PowerShell","Testing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamdriscoll%2Fselenium-powershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamdriscoll%2Fselenium-powershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamdriscoll%2Fselenium-powershell/lists"}