4

Before Laravel's 5.2 release, Laracasts' integrated package was providing Selenium integration for Laravel. I couldn't find any similar package for the 5.2 release. Is there any? How can I integrate selenium testing with Laravel?

I've seen these links, they do not provide any solutions:
Selenium and Laravel 5.2
Has anyone tried Laravel Integrated package in Laravel 5.2?

2
  • Check this out ;) github.com/Kyslik/asos-selenium/tree/master/application its step by step. You can easily deduct how to us it within Laravel scope. Commented Nov 12, 2016 at 20:14
  • yeah i know i can use webdriver with phpunit. but i wanted an integration package like laracasts' integrated. thank for the link though. Commented Nov 13, 2016 at 7:47

1 Answer 1

3

PHPUnit itself has a selenium extension. It's not quite laravelish, and is not backed by a modern WebDriver interface.

CodeCeption is a very powerful, yet easy-to-use testing tool for PHP. Not only does it provide a unit-testing API, it also provides its own selenium acceptance testing API.

It also has perfect Laravel integration and a great chrome extension for generating acceptance test in browser. Here's an example code from the docs:

<?php
$I->amOnPage('/login');
$I->fillField('username', 'davert');
$I->fillField('password', 'qwerty');
$I->click('LOGIN');
$I->see('Welcome to codeception!');

Here's a step-by-step guide to getting started with acceptance testing using CodeCeption:
http://codeception.com/11-20-2013/webdriver-tests-with-codeception.html

Here are some other options:
https://github.com/lmc-eu/steward
https://github.com/Modelizer/Selenium
https://github.com/jhoopes/laravel-selenium-driver

Update: Good news.
Update: See Mink's PHPUnit integration.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.