symfony / panther

A browser testing and web crawling library for PHP and Symfony
MIT License
2.94k stars 222 forks source link

`createAdditionalPantherClient()` with Firefox driver not working #597

Open yedprior opened 1 year ago

yedprior commented 1 year ago

Opening secondary client when createPantherClient use firefox driver send "Facebook\WebDriver\Exception\SessionNotCreatedException: Session is already started" exception when $client2->request('GET', '/chat'); is called in this example :

$client1 = self::createPantherClient(['browser' => static::FIREFOX]);
$client1->request('GET', '/chat'); 

// Connect a 2nd user using an isolated browser and say hi!
$client2 = self::createAdditionalPantherClient();
$client2->request('GET', '/chat');
$client2->submitForm('Post message', ['message' => 'Hi folks 👋😻']);

// Wait for the message to be received by the first client
$client1->waitFor('.message');

// Symfony Assertions are always executed in the **primary** browser
$this->assertSelectorTextContains('.message', 'Hi folks 👋😻');

It works fine with chrome driver (open 2 windows with navigator).

halfer commented 1 year ago

I suspect this is by design:

https://github.com/mozilla/geckodriver/issues/1946