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()); }
public function _initialize() { getenv('BROWSERSTACK_USERNAME') ? $this->config["capabilities"]["browserstack.user"] = getenv('BROWSERSTACK_USERNAME') : 0; getenv('BROWSERSTACK_ACCESS_KEY') ? $this->config["capabilities"]["browserstack.key"] = getenv('BROWSERSTACK_ACCESS_KEY') : 0; if (array_key_exists("browserstack.local", $this->config["capabilities"]) && $this->config["capabilities"]["browserstack.local"]) { $bs_local_args = array("key" => $this->config["capabilities"]["browserstack.key"]); $this->bs_local = new BrowserStack\Local(); $this->bs_local->start($bs_local_args); } parent::_initialize(); }
public function _initialize() { parent::_initialize(); $this->webDriver->manage()->timeouts()->setScriptTimeout($this->config['script_timeout']); }
/** * Initializes the module setting the properties values. * @return void */ public function _initialize() { parent::_initialize(); $this->loginUrl = str_replace('wp-admin', 'wp-login.php', $this->config['adminUrl']); $this->adminUrl = rtrim($this->config['adminUrl'], '/'); $this->pluginsUrl = $this->adminUrl . '/plugins.php'; }