Category: symfony-panther

Symfony Panther : how to test the member area?

With Symfony 5 and PHPUnit functionnals tests, I can test the member area with : class MediaChangePrivacyTest extends WebTestCase { public function testFunctionnal() { $client = static::createClient(); $user = $client->getContainer()->get(‘doctrine’)->getRepository(User::class)->findOneById(1); $session = $client->getContainer()->get(‘session’); $token = new UsernamePasswordToken($user, null, ‘main’, $user->getRoles());…

Change user-agent for Symfony Panther Chromeclient

How do I change the user-agent in a headless Chrome created by Symfony’s Panther createChromeClient()? When I create a Chrome client with $client = SymfonyComponentPantherClient::createChromeClient(); I see in the access_log a user-agent of “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like…

Symfony panter: getting error unknown error: failed to write prefs file from facebook/webdriver

I have build a webcrawler for a client in Laravel. To accomplish this i use the symfony panter package. symfony panter I finished developing it and have been asked to put it on the server of the client, which is…