Skip to content

Instantly share code, notes, and snippets.

@dbarbar
Created October 15, 2014 20:30
Show Gist options
  • Save dbarbar/9e9ebfc2094edcd255a8 to your computer and use it in GitHub Desktop.
Save dbarbar/9e9ebfc2094edcd255a8 to your computer and use it in GitHub Desktop.
./vendor/bin/codecept run acceptance JunkCept.php -d
<?php
$I = new \AcceptanceTester\SpringboardSteps($scenario);
$I->amOnPage('/');
$I->executeInSelenium(function (\Webdriver $webdriver) {
$executor = $webdriver->getCommandExecutor();
$session = $executor->execute('getSession', array());
if ($session['browserName'] == 'phantomjs') {
// do something special
codecept_debug(var_export($session, TRUE));
codecept_debug('using phantomjs');
}
else {
// do some other thing.
codecept_debug('not using phantomjs');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment