public function setUp() { $this->noPhpWebserver(); $this->noSelenium(); $this->module = new \Codeception\Module\WebDriver(make_container()); $url = 'http://localhost:8000'; $this->module->_setConfig(['url' => $url, 'browser' => 'firefox', 'port' => '4444', 'restart' => true, 'wait' => 0]); $this->module->_initialize(); $this->module->_before($this->makeTest()); $this->webDriver = $this->module->webDriver; }
public function setUp() { $this->noPhpWebserver(); $this->noSelenium(); $this->module = new \Codeception\Module\WebDriver(); $url = ''; if (version_compare(PHP_VERSION, '5.4', '>=')) { $url = 'http://localhost:8000'; } $this->module->_setConfig(array('url' => $url, 'browser' => 'firefox', 'port' => '4444', 'restart' => true, 'wait' => 0)); $this->module->_initialize(); $this->module->_before($this->makeTest()); }
/** * Override method to add test name to the capabilities. * Name will be shown in sauce labs / testing bot / browser stack services * * @param TestCase $test */ public function _before(TestCase $test) { $this->config['capabilities']['name'] = get_class($test->getTestClass()) . ':' . $test->getName(); parent::_before($test); }