lundi 26 octobre 2015

Run Mink with Selenium2 from php

In my symfony2 project I want to be able to run specific scenarious from my service using Mink tests with Selenium2 without writing behat scenarious.

Some abstract Example how i imagine this:

class MyService extends MinkContext
{
    /**
     * @var Mink $mink Mink
     */
    private $mink;

    /**
     * Set up
     */
    public function setUp()
    {
        $this->mink = new Mink();
        $this->mink->setUp($this->createSeleniumDriver());
    }

    /**
     * Run scenario
     */
    public function runScenario()
    {
        $this->visit('http://google.com.com');
        $this->pressButton('Google Search');
    }
}

So i want to be able to connect Mink with Selenium driver and then all my Mink tests run in some browser like in does Behat when you specify @javascript tag for behat scenario.

Any ideas ho to do that?

Aucun commentaire:

Enregistrer un commentaire