sebastianbergmann/phpunit-selenium — Issue #97: ShareSession does not work correct
Author: emaks
Created: 2012-02-20 11:45:11+00:00
State: open

I use xml-file for configuring browsers for which I want run my tests

example:
< selenium>
< browser name="Firefox"
browser="*firefox"
host="localhost"
port="4444"
timeout="30000" />

< selenium>
< browser name="googlechrome"
browser="googlechrome"
host="localhost"
port="4444"
timeout="30000" />
< /selenium>

If I run tests

example:
class test extends PHPUnit_Extensions_SeleniumTestCase
{
protected function setUp()
{
$this->setBrowserUrl("http://google.com");
$this->prepareTestSession();
}

protected function assertPreConditions()
{
$this->open('/');
$this->assertSame('Google', $this->getTitle());
}

/**
* @test
*/
public function test1()
{
$this->assertElementPresent("//input[@type='submit'][@name='btnK']");
}

/**
* @test
*/
public function test2()
{
$this->assertElementPresent("//input[@type='submit'][@name='btnI']");
}
}
Everything is good
But if I use
$this->shareSession($this->prepareTestSession()); instead of $this->prepareTestSession();

ALL my tests(4) are runned using only first browser