Browse files

added selenium2 session support

  • Loading branch information...
1 parent 788e4a1 commit 7b469c8d4bd687b4c4ab5c9fee470d4059fc6388 Oleg Zinchenko committed Mar 1, 2012
View
29 DependencyInjection/Configuration.php
@@ -104,6 +104,35 @@ public function getConfigTreeBuilder()
end()->
end()->
end()->
+ arrayNode('selenium2')->
+ children()->
+ scalarNode('browser')->
+ defaultValue('%behat.mink.browser_name%')->
+ end()->
+ arrayNode('capabilities')->
+ children()->
+ scalarNode('browserName')->
+ defaultValue('firefox')->
+ end()->
+ scalarNode('version')->
+ defaultValue(8)->
+ end()->
+ scalarNode('platform')->
+ defaultValue('ANY')->
+ end()->
+ scalarNode('browserVersion')->
+ defaultValue(8)->
+ end()->
+ scalarNode('browser')->
+ defaultValue('firefox')->
+ end()->
+ end()->
+ end()->
+ scalarNode('wd_host')->
+ defaultValue('http://localhost:4444/wd/hub')->
+ end()->
+ end()->
+ end()->
end()->
end();
}
View
3 DependencyInjection/MinkExtension.php
@@ -51,6 +51,9 @@ public function load(array $configs, ContainerBuilder $container)
if (isset($config['selenium'])) {
$loader->load('sessions/selenium.xml');
}
+ if (isset($config['selenium2'])) {
+ $loader->load('sessions/selenium2.xml');
+ }
foreach ($config as $ns => $tlValue) {
if (!is_array($tlValue)) {
View
35 Resources/config/sessions/selenium2.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" ?>
+<container xmlns="http://symfony.com/schema/dic/services"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
+ <parameters>
+
+ <parameter key="behat.mink.driver.selenium2.class">Behat\Mink\Driver\Selenium2Driver</parameter>
+
+ <parameter key="behat.mink.selenium2.browser">%behat.mink.browser_name%</parameter>
+ <parameter key="behat.mink.selenium2.capabilities">
+ <parameter key="browserName">firefox</parameter>
+ <parameter key="version">8</parameter>
+ <parameter key="platform">ANY</parameter>
+ <parameter key="browserVersion">8</parameter>
+ <parameter key="browser">firefox</parameter>
+ </parameter>
+ <parameter key="behat.mink.selenium2.wd_host">http://localhost:4444/wd/hub</parameter>
+
+ </parameters>
+ <services>
+
+ <service id="behat.mink.session.selenium2" class="%behat.mink.session.class%" scope="prototype">
+ <argument type="service">
+ <service class="%behat.mink.driver.selenium2.class%" scope="prototype">
+ <argument type="string">%behat.mink.selenium2.browser%</argument>
+ <argument type="collection">%behat.mink.selenium2.capabilities%</argument>
+ <argument type="string">%behat.mink.selenium2.wd_host%</argument>
+ </service>
+ </argument>
+ <argument type="service" id="behat.mink.selectors_handler" />
+ <tag name="behat.mink.session" alias="selenium2" />
+ </service>
+
+ </services>
+</container>

0 comments on commit 7b469c8

Please sign in to comment.