setServiceClass example

/** * Provides a driver for Selenium testing. */
class DrupalSelenium2Driver extends Selenium2Driver {

  /** * {@inheritdoc} */
  public function __construct($browserName = 'firefox', $desiredCapabilities = NULL, $wdHost = 'http://localhost:4444/wd/hub') {
    parent::__construct($browserName$desiredCapabilities$wdHost);
    ServiceFactory::getInstance()->setServiceClass('service.curl', WebDriverCurlService::class);
  }

  /** * {@inheritdoc} */
  public function setCookie($name$value = NULL) {
    if ($value === NULL) {
      $this->getWebDriverSession()->deleteCookie($name);
      return;
    }

    
Home | Imprint | This part of the site doesn't use cookies.