Ejemplo n.º 1
1
 protected function getDefaultConfiguration()
 {
     $config = parent::getDefaultConfiguration();
     $capabilitities = $config['definition']['class']['Magium\\WebDriver\\WebDriverFactory']['create']['desired_capabilities']['default'];
     if ($capabilitities instanceof DesiredCapabilities) {
         /*
          * Following is browser-specific functionality.  Non-browser-generic commands can be set here.  This example
          * changes the language for the browser to Spanish.
          *
          * The code for the HTML page is
          * <html><body><?php echo $_SERVER['HTTP_ACCEPT_LANGUAGE']; ?></body></html>
          */
         $options = new ChromeOptions();
         $options->addArguments(['--lang=es']);
         $capabilitities->setCapability(ChromeOptions::CAPABILITY, $options);
     }
     return $config;
 }
Ejemplo n.º 2
0
 public function testInitialize()
 {
     $initializer = new Initializer();
     $test = new JustMe(null, [], null, $initializer);
     $initializer->initialize($test);
     $webDriver = $test->get('Magium\\WebDriver\\WebDriver');
     self::assertInstanceOf('Magium\\WebDriver\\WebDriver', $webDriver);
 }