protected function setUp() { parent::setUp(); $this->_screenshots = array(); $browserName = Xtest::getArg('browser', 'firefox'); $browserData = Mage::getConfig()->getNode('default/xtest/selenium/browserlist/' . strtolower($browserName)); if ($browserData) { $browserData = $browserData->asArray(); $capabilities = array(); if ($browserData['is_browserstack']) { if ($browserstackConfig = Mage::getConfig()->getNode('default/xtest/selenium/browserstack')) { $browserstackConfig = $browserstackConfig->asArray(); $this->setHost($browserstackConfig['host']); $this->setPort((int) $browserstackConfig['port']); if (file_exists($browserstackConfig['authfile'])) { list($user, $key) = explode(':', file_get_contents($browserstackConfig['authfile'])); $capabilities['browserstack.user'] = trim($user); $capabilities['browserstack.key'] = trim($key); } } } $this->setBrowser($browserData['name']); if ($caps = $browserData['capabilities']) { $capabilities = array_merge($capabilities, $caps); } $this->setDesiredCapabilities($capabilities); } else { $this->setBrowser($browserName); } $this->setBrowserUrl(Mage::getBaseUrl()); $this->setUpSessionStrategy(null); // Default Browser-Size $this->prepareSession()->currentWindow()->size(array('width' => 1280, 'height' => 1024)); Xtest::initFrontend(); }
protected function setUp() { parent::setUp(); Xtest::initFrontend(); }