{"id":15014453,"url":"https://github.com/modelizer/laravel-selenium","last_synced_at":"2025-10-06T07:57:36.541Z","repository":{"id":57018783,"uuid":"67329041","full_name":"Modelizer/Laravel-Selenium","owner":"Modelizer","description":"Selenium Testing for Laravel 5","archived":false,"fork":false,"pushed_at":"2019-08-19T12:25:24.000Z","size":30373,"stargazers_count":108,"open_issues_count":5,"forks_count":33,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-12T04:31:14.574Z","etag":null,"topics":["laravel-package","laravel-selenium","phpunit","testing"],"latest_commit_sha":null,"homepage":"","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/Modelizer.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":"2016-09-04T06:17:02.000Z","updated_at":"2025-05-25T20:34:14.000Z","dependencies_parsed_at":"2022-08-22T20:20:28.947Z","dependency_job_id":null,"html_url":"https://github.com/Modelizer/Laravel-Selenium","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/Modelizer/Laravel-Selenium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Modelizer%2FLaravel-Selenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Modelizer%2FLaravel-Selenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Modelizer%2FLaravel-Selenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Modelizer%2FLaravel-Selenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Modelizer","download_url":"https://codeload.github.com/Modelizer/Laravel-Selenium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Modelizer%2FLaravel-Selenium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278577933,"owners_count":26009701,"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-06T02:00:05.630Z","response_time":65,"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":["laravel-package","laravel-selenium","phpunit","testing"],"created_at":"2024-09-24T19:45:39.324Z","updated_at":"2025-10-06T07:57:36.519Z","avatar_url":"https://github.com/Modelizer.png","language":"PHP","readme":"\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/7669734/21817480/2c76852e-d78a-11e6-9ac8-66cfa79a922a.png\" alt=\"Laravel 5.x Testing for Selenium made easy.\" /\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://travis-ci.org/Modelizer/Laravel-Selenium\"\u003e\u003cimg src=\"https://travis-ci.org/Modelizer/Laravel-Selenium.svg?branch=master\" /\u003e\u003c/a\u003e \n\u003ca href=\"https://codeclimate.com/github/Modelizer/Selenium\"\u003e\u003cimg src=\"https://codeclimate.com/github/Modelizer/Selenium/badges/gpa.svg\" alt=\"Code Climate\" /\u003e\u003c/a\u003e \n\u003ca href=\"https://styleci.io/repos/67329041\"\u003e\u003cimg src=\"https://styleci.io/repos/67329041/shield?branch=master\" alt=\"StyleCI\" /\u003e\u003c/a\u003e \n\u003ca href=\"https://packagist.org/packages/modelizer/selenium\"\u003e\u003cimg src=\"https://poser.pugx.org/modelizer/selenium/v/stable\" alt=\"Latest Stable Version\" /\u003e\u003c/a\u003e \n\u003ca href=\"https://packagist.org/packages/modelizer/selenium\"\u003e\u003cimg src=\"https://poser.pugx.org/modelizer/selenium/downloads\" alt=\"Total Downloads\" /\u003e\u003c/a\u003e \n\u003ca href=\"https://packagist.org/packages/modelizer/selenium\"\u003e\u003cimg src=\"https://poser.pugx.org/modelizer/selenium/license\" alt=\"License\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Key Points:\n1. You don't need to download anything except this package.\n2. This package download the selenium standalone server v3.11.0 by default and chrome driver will be downloaded based on operating system.\n3. Fluit API based on [Browser Testing Kit](https://github.com/laravel/browser-kit-testing)\n3. Has a minimum configuration option and many things are pulled from the Laravel default configuration.\n\n| Version      | Package Version |\n| ------------ | --------------- |\n| Laravel 5.6  | 2.0             |\n| Laravel 5.*  | 1.0             |\n| PHP 7.1      | 2.0             |\n\n## Requirements:\n1. Java should be installed on local machine.\n2. You should have at least basic understanding of PHPUnit.\n\n\n## Installation guide:\nInstalling with [Laravel Package Manager](https://github.com/Qafeen/Manager) then you can install it by running given command \u003cb\u003e⇩\u003c/b\u003e and Manager will take care to register selenium service provider.\n```php \nphp artisan add modelizer/selenium\n``` \n\nOr you can do it by composer.\n```php\ncomposer require modelizer/selenium \"~2.0\"\n```\n\nRegister service provider in `app.php`\n```php\nModelizer\\Selenium\\SeleniumServiceProvider::class\n```\n\nWorking with environment variables:\nYou need to create sperate file `testing.env` in root directory to load testing specific variable. example\n```\nAPP_URL=http://testing.dev:8000\n```\n\nDon't forget to clear laravel configuration cache file.\n```php\nphp artisan config:clear\n```\n\nWe are done! Lets start the selenium server.\n```php\nphp artisan selenium:start\n```\n\n## Create first test:\n\nVia an Artisan command\n\n ```php\n php artisan selenium:make:test SeleniumExampleTest\n ```\n\nManually\n\n1. Create a dummy `SeleniumExampleTest.php` file in `tests` directory.\n2. Add this code to `SeleniumExampleTest.php` file and run phpunit `vendor/bin/phpunit tests/SeleniumExampleTest.php`\n```php\n\u003c?php\n\nnamespace Tests;\n\nuse Modelizer\\Selenium\\SeleniumTestCase;\n\nclass SeleniumExampleTest extends SeleniumTestCase\n{\n    /**\n     * A basic functional test example.\n     *\n     * @return void\n     */\n    public function testBasicExample()\n    {\n        // This is a sample code you can change as per your current scenario\n        $this-\u003evisit('/')\n             -\u003esee('Laravel')\n             -\u003ehold(3);\n    }\n\n    /**\n     * A basic submission test example.\n     *\n     * @return void\n     */\n    public function testLoginFormExample()\n    {\n        $loginInput = [\n            'username' =\u003e 'dummy-name',\n            'password' =\u003e 'dummy-password'\n        ];\n\n        // Login form test case scenario\n        $this-\u003evisit('/login')\n             -\u003esubmitForm('#login-form', $loginInput)\n             -\u003esee('Welcome');  // Expected Result\n    }\n}\n```\n\n## Run the test cases\n```php\nvendor/bin/steward run staging chrome\n```\n\nThis package is been build on top of [Steward](https://github.com/lmc-eu/steward/) for running test case with specific arguments you can check out [Steward's Wiki](https://github.com/lmc-eu/steward/wiki/Run-only-specified-tests)\n\nFor full documentation you can checkout our [API wiki](https://github.com/Modelizer/Laravel-Selenium/wiki/APIs). Which internally inherit [facebook Web Driver](https://github.com/facebook/php-webdriver) so you can liverage full functionality of these dependency packages.\n\n## Notes:\n1. Selenium 3.11.0 and ChromeDriver 2.35 is been used.\n2. Feel free to contribute or create an issue.\n3. The user will not be able to swap between PHPUnit and Selenium who are below Laravel 5.3.\n4. We made changelog as [release board](https://github.com/Modelizer/Laravel-Selenium/releases) and [wiki](https://github.com/Modelizer/Selenium/wiki/change-log).\n5. If a virtual machine is being used such as VirtualBox (Vagrant, Homestead), a framebuffer is needed:\n\n ```bash\n # install xvfb if needed:\n sudo apt-get install xvfb\n\n # run Xvfb\n sudo nohup Xvfb :10 -ac\n\n # Set DISPLAY environment variable\n export DISPLAY=:10\n ```\n\n## Roadmap:\n1. ~~Firefox support added.~~ (Note: Only work when user has installed firefox locally)\n2. ~~Windows and Linux support needs to be added.~~\n3. ~~Drivers files should get downloaded as per user-specific operating system.~~\n4. Add more support for more API.\n5. Support for multiple browser.\n6. Behat integration if possible (research)\n7. Support for 3rd party services such as saucelab.\n\n## Summary:\nMany APIs such as `see`, `wait`, `submitForm` etc are been implemented in Laravel 5.3, and the whole goal of this package is to make it easier for the user to swap testing type anytime.\nEg: If a user wants to test by selenium then he only need to extend `Modelizer\\Selenium\\SeleniumTestCase` in his test case or if he wants to do PHPUnit testing then he will be able to do it by extending `TestCase` which Laravel 5.3 provide by default. This will help the user to test a case in many different testing types without doing any changes with API.\n\n\n\u003ca name=\"Contribution\"\u003e\u003c/a\u003e\n## Contribution:\n1. If you like this package you can give it a star.\n2. Help to keep readme up to date with some functionality which exist in this package but not visible to other.\n3. Feel free to create PR or Issues or suggestion which can help this package to grow.\nJust do it. You are welcome :)\n\n\n\u003ca name=\"Credits\"\u003e\u003c/a\u003e\n## Credits\n\n| Contributors           | Twitter   | Ask for Help | Site |\n|------------------------|-----------|--------------|------|\n| [Mohammed Mudassir](https://github.com/Modelizer) (Creator) | @[md_mudasir](https://twitter.com/md_mudasir) | hello@mudasir.me | [http://mudasir.me](http://mudasir.me/) |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelizer%2Flaravel-selenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodelizer%2Flaravel-selenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodelizer%2Flaravel-selenium/lists"}