Whenever I run Sahi, it is using Firefox by default. What I am trying to do is have more control over the browser I use. I have followed instructions from http://mink.behat.org/#sahidriver
and my behat.yml is :
default:
formatter:
name: progress
extensions:
Behat\Symfony2Extension\Extension:
mink_driver: true
kernel:
env: test
debug: true
Behat\MinkExtension\Extension:
sahi: ~
goutte: ~
base_url: 'http://local.referral.com'
default_session: sahi
My function is:
public function iAmOnHomepage()
{
$session = $this->getSession();
$session->visit($this->locatePath('/'));
$link = $session->getPage()->findLink('I am a Physician');
if (null === $link) {
throw new \LogicException("Home Page Not Loaded:\n");
}
}
How do I specify additional instructions like browser etc? Is that in code or in yml file.
If so how do I do it?
You could set up multiple profiles to run the same scenarios against different browsers.
source: https://github.com/Behat/MinkBundle/issues/15
See available parameters here: https://github.com/Behat/MinkBundle/blob/master/DependencyInjection/Configuration.php#L29