Exemplo n.º 1
0
 public function __construct(Nette\DI\Container $serviceLocator, \PHPUnit_Extensions_Selenium2TestCase_Driver $driver, \PHPUnit_Extensions_Selenium2TestCase_URL $url, array $parameters, \PHPUnit_Extensions_Selenium2TestCase_Session_Timeouts $timeouts)
 {
     parent::__construct($driver, $url, $parameters['browserUrl'], $timeouts);
     $this->serviceLocator = $serviceLocator;
     $this->linkGenerator = new LinkGeneratorPresenter($this->serviceLocator);
     $this->httpServerUrl = $serviceLocator->getByType('Nette\\Http\\IRequest')->getUrl();
     $this->parameters = $parameters;
     $this->keysHolder = new \PHPUnit_Extensions_Selenium2TestCase_KeysHolder();
     $this->currentWindow()->maximize();
 }
Exemplo n.º 2
0
 /**
  * @param \Nette\DI\Container $context
  */
 public function __construct(\Nette\DI\Container $context)
 {
     $this->context = $context;
     $seleniumServerUrl = new \PHPUnit_Extensions_Selenium2TestCase_URL($context->parameters['selenium']['seleniumServer']);
     $driver = new \PHPUnit_Extensions_Selenium2TestCase_Driver($seleniumServerUrl);
     $sessionCreationApiUrl = $seleniumServerUrl->descend("/wd/hub/session");
     $sessionCreationResponse = $driver->curl('POST', $sessionCreationApiUrl, array('desiredCapabilities' => $context->parameters['selenium']['desiredCapabilities']));
     $sessionApiUrl = $sessionCreationResponse->getUrl();
     $baseUrl = new \PHPUnit_Extensions_Selenium2TestCase_URL($context->parameters['selenium']['baseUrl']);
     $timeouts = new \PHPUnit_Extensions_Selenium2TestCase_Session_Timeouts($driver, $sessionApiUrl->descend('timeouts'), 60 * 1000);
     parent::__construct($driver, $sessionApiUrl, $baseUrl, $timeouts);
 }
Exemplo n.º 3
0
 public function __construct($driver, PHPUnit_Extensions_Selenium2TestCase_URL $url, PHPUnit_Extensions_Selenium2TestCase_URL $baseUrl, PHPUnit_Extensions_Selenium2TestCase_Session_Timeouts $timeouts)
 {
     $this->baseUrl = $baseUrl;
     parent::__construct($driver, $url, $baseUrl, $timeouts);
 }