{"id":19325067,"url":"https://github.com/spatie/selenium-client","last_synced_at":"2025-10-05T06:56:33.637Z","repository":{"id":66126096,"uuid":"148273712","full_name":"spatie/selenium-client","owner":"spatie","description":"A PHP Selenium client","archived":false,"fork":false,"pushed_at":"2022-03-21T13:04:07.000Z","size":26219,"stargazers_count":30,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T20:47:09.467Z","etag":null,"topics":["automation","browser","debugging","forms","selenium","testing"],"latest_commit_sha":null,"homepage":"https://spatie.be/open-source","language":"PHP","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/spatie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null}},"created_at":"2018-09-11T06:52:31.000Z","updated_at":"2025-02-11T21:34:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"565b6f80-e95d-4204-b4dc-cdc77a5f7329","html_url":"https://github.com/spatie/selenium-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spatie/selenium-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Fselenium-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Fselenium-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Fselenium-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Fselenium-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spatie","download_url":"https://codeload.github.com/spatie/selenium-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatie%2Fselenium-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278420205,"owners_count":25983812,"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-10-05T02:00:06.059Z","response_time":54,"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":["automation","browser","debugging","forms","selenium","testing"],"created_at":"2024-11-10T02:08:46.972Z","updated_at":"2025-10-05T06:56:33.632Z","avatar_url":"https://github.com/spatie.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/support-ukraine.svg?t=1\" /\u003e](https://supportukrainenow.org)\n\n# PHP Selenium client\n\n[Selenium](https://www.seleniumhq.org/) is a great tool for testing.  This package gives you a boilerplate setup to automate UI testing tasks you'd do manually otherwise.\n\nFor example: you can make a scenario to test the flow of a form in one of your projects, \nwithout having to worry about setting up Selenium itself. \nThis package uses Chrome by default, but you're able to override it with whatever driver you want.\n\n## Support us\n\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/selenium-client.jpg?t=1\" width=\"419px\" /\u003e](https://spatie.be/github-ad-click/selenium-client)\n\nWe invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).\n\nWe highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).\n\n## Installation\n\n```bash\ngit clone git@github.com:spatie/selenium-client.git\n```\n\n## Usage\n\nYou can add your own scenarios in the `Scenarios` folder. \n\nNext, you'll need to start the Selenium server like so:\n\n```bash\nphp client.php serve\n```\n\nNext you can run your scenarios like so:\n\n```bash\nphp client.php execute dummy [--wait]\n```\n\nAdding the `--wait` option will keep the browser open until you manually stop it.\n\n### Making scenarios\n\nScenario classes should extend `Spatie\\Selenium\\Scenario`. \nThere are a few helper methods provided like `$this-\u003eelement($selector)` and `$this-\u003eclick($selector)`;\nbut you can also directly access the Selenium driver via `$this-\u003edriver`.\n\nFor more information about the Selenium driver, please visit [this repository](https://github.com/facebook/php-webdriver).\n\nA simple scenario can look like this.\n\n```php\nclass MyScenario extends Scenario\n{\n    public function __construct()\n    {\n        // The website to visit.\n        \n        parent::__construct('https://mywebsite.com.test');\n    }\n\n    public function run()\n    {\n        // Go to a page\n        $this-\u003eget('/contact');\n\n        $this-\u003eelement('input[name=name]')-\u003esendKeys('Brent');\n        $this-\u003eelement('input[name=email]')-\u003esendKeys('brent@spatie.be');\n        $this-\u003eelement('input[name=message']-\u003esendKeys('Test');\n        \n        $this-\u003esubmit('form#contact');\n    }\n}\n```\n\nScenarios can be run with the `execute` command, in this case you'd run `execute my`. \n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n### Security\n\nIf you've found a bug regarding security please mail [security@spatie.be](mailto:security@spatie.be) instead of using the issue tracker.\n\n## Postcardware\n\nYou're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.\n\nOur address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.\n\nWe publish all received postcards [on our company website](https://spatie.be/en/opensource/postcards).\n\n## Credits\n\n- [Brent Roose](https://github.com/brendt)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Fselenium-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspatie%2Fselenium-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatie%2Fselenium-client/lists"}