PHPackages                             modelizer/selenium - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. modelizer/selenium

ActiveLibrary[Testing &amp; Quality](/categories/testing)

modelizer/selenium
==================

Selenium Package for laravel 5.

v2.0.2(6y ago)10555.0k↓91.7%32[5 issues](https://github.com/Modelizer/Laravel-Selenium/issues)1MITPHPPHP &gt;=7.1

Since Sep 4Pushed 6y ago7 watchersCompare

[ Source](https://github.com/Modelizer/Laravel-Selenium)[ Packagist](https://packagist.org/packages/modelizer/selenium)[ RSS](/packages/modelizer-selenium/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (31)Used By (1)

[![Laravel 5.x Testing for Selenium made easy.](https://cloud.githubusercontent.com/assets/7669734/21817480/2c76852e-d78a-11e6-9ac8-66cfa79a922a.png)](https://cloud.githubusercontent.com/assets/7669734/21817480/2c76852e-d78a-11e6-9ac8-66cfa79a922a.png)
============================================================================================================================================================================================================================================================

[](#)

[![](https://camo.githubusercontent.com/39739fd2eca580bc4e22a051a8aa116c17f705a2673ca3ec809d5c9b993bda78/68747470733a2f2f7472617669732d63692e6f72672f4d6f64656c697a65722f4c61726176656c2d53656c656e69756d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Modelizer/Laravel-Selenium) [![Code Climate](https://camo.githubusercontent.com/c675031f798d43ec7e306a31435e3af1cac4da002865d97bad4bb458390bb8df/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4d6f64656c697a65722f53656c656e69756d2f6261646765732f6770612e737667)](https://codeclimate.com/github/Modelizer/Selenium) [![StyleCI](https://camo.githubusercontent.com/3ed9ab99db8d4522e6711befadf6b0d30a837c42483116aece55f7af9f374e45/68747470733a2f2f7374796c6563692e696f2f7265706f732f36373332393034312f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/67329041) [![Latest Stable Version](https://camo.githubusercontent.com/ea54aeedb791a5031c1472c5ea0aadc2fa1f4a5e70560935ffc542a6a8b0bd72/68747470733a2f2f706f7365722e707567782e6f72672f6d6f64656c697a65722f73656c656e69756d2f762f737461626c65)](https://packagist.org/packages/modelizer/selenium) [![Total Downloads](https://camo.githubusercontent.com/1ce519b0088f266634dc6c63d64104ea3d3e8ac4c415febf9f2a0f5cc8a1c37d/68747470733a2f2f706f7365722e707567782e6f72672f6d6f64656c697a65722f73656c656e69756d2f646f776e6c6f616473)](https://packagist.org/packages/modelizer/selenium) [![License](https://camo.githubusercontent.com/1db37580c7412436b9a9a83151c8ace2d4e42af97aba04672a4aba7a41d1c755/68747470733a2f2f706f7365722e707567782e6f72672f6d6f64656c697a65722f73656c656e69756d2f6c6963656e7365)](https://packagist.org/packages/modelizer/selenium)

Key Points:
-----------

[](#key-points)

1. You don't need to download anything except this package.
2. This package download the selenium standalone server v3.11.0 by default and chrome driver will be downloaded based on operating system.
3. Fluit API based on [Browser Testing Kit](https://github.com/laravel/browser-kit-testing)
4. Has a minimum configuration option and many things are pulled from the Laravel default configuration.

VersionPackage VersionLaravel 5.62.0Laravel 5.\*1.0PHP 7.12.0Requirements:
-------------

[](#requirements)

1. Java should be installed on local machine.
2. You should have at least basic understanding of PHPUnit.

Installation guide:
-------------------

[](#installation-guide)

Installing with [Laravel Package Manager](https://github.com/Qafeen/Manager) then you can install it by running given command **⇩** and Manager will take care to register selenium service provider.

```
php artisan add modelizer/selenium
```

Or you can do it by composer.

```
composer require modelizer/selenium "~2.0"
```

Register service provider in `app.php`

```
Modelizer\Selenium\SeleniumServiceProvider::class
```

Working with environment variables: You need to create sperate file `testing.env` in root directory to load testing specific variable. example

```
APP_URL=http://testing.dev:8000

```

Don't forget to clear laravel configuration cache file.

```
php artisan config:clear
```

We are done! Lets start the selenium server.

```
php artisan selenium:start
```

Create first test:
------------------

[](#create-first-test)

Via an Artisan command

```
php artisan selenium:make:test SeleniumExampleTest
```

Manually

1. Create a dummy `SeleniumExampleTest.php` file in `tests` directory.
2. Add this code to `SeleniumExampleTest.php` file and run phpunit `vendor/bin/phpunit tests/SeleniumExampleTest.php`

```
