phpunit-selenium icon indicating copy to clipboard operation
phpunit-selenium copied to clipboard

Deprecated configuration setting "selenium" used

Open x-yuri opened this issue 10 years ago • 5 comments

I'm running phpunit with the following phpunit.xml:

<phpunit ...>
    <selenium>                                                                                                         
        <browser name="Firefox" browser="*firefox" />                                                                  
    </selenium>
</phpunit>

But it says:

PHPUnit 4.7.5 by Sebastian Bergmann and contributors.
Warning:        Deprecated configuration setting "selenium" used
...

@sebastianbergmann says "it's for you to figure out."

x-yuri avatar Jun 21 '15 22:06 x-yuri

Hi, from the new version of PHPUnit this configuration has been deprecated so we will target a separate XML file. Basically PHPUnit will not support anymore these project-specific XML tags.

giorgiosironi avatar Jul 02 '15 20:07 giorgiosironi

So, I take it I'm to delete <selenium>...</selenium> thing and in case of yii add $this->setBrowser('*firefox'); to WebTestCase::setUp. This way I see no warnings. Correct me if I'm wrong.

x-yuri avatar Jul 06 '15 09:07 x-yuri

This is a solution that would work, an additional XML configuration file is possible but I have doubts it's the most modern solution to configuration.

giorgiosironi avatar Jul 12 '15 09:07 giorgiosironi

Where is info about deprecation? (in docs)

Here I couldn't find anything. https://phpunit.de/manual/current/en/appendixes.configuration.html

I want to know, which way should be added that "external XML file" with selenium settings.

JulianVolodia avatar Jul 14 '15 11:07 JulianVolodia

No other external XML file is supported at the moment. PRs about a modern approach to configure the browsers are welcome, it does not need to be XML.

giorgiosironi avatar Oct 18 '15 13:10 giorgiosironi