Category : symfony-panther

I faced with that error again, have a look please "require-dev": { "dbrekelmans/bdi": "^0.3.0", "symfony/panther": "^1.1", [email protected]:/auth_service# /usr/lib/chromium/chromium –version Chromium 90.0.4430.212 [email protected]:/auth_service# drivers/chromedriver –version ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/[email protected]{#429}) and error FacebookWebDriverExceptionUnknownErrorException: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn’t exist) (The process started from chrome location /usr/bin/chromium is no longer running, ..

Read more

Some time ago everythig works fine, but after rebuild my image I faced with error composer json "require-dev": { "dbrekelmans/bdi": "^0.3.0", "symfony/panther": "^1.1", I chcked version chromium and driver [email protected]:/auth_service# /usr/lib/chromium/chromium –version Chromium 90.0.4430.212 [email protected]:/auth_service# drivers/chromedriver –version ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/[email protected]{#429}) when I try to use $this->panterClient = Client::createChromeClient( ‘/usr/bin/chromedriver’, [ ‘–remote-debugging-port=9222’, ‘–no-sandbox’ ], [‘request_timeout_in_ms’ => ..

Read more

Some time ago everythig works fine, but after rebuild my image I faced with error composer json "require-dev": { "dbrekelmans/bdi": "^0.3.0", "symfony/panther": "^1.1", [email protected]:/auth_service# /usr/lib/chromium/chrome –version bash: /usr/lib/chromium/chrome: No such file or directory [email protected]:/auth_service# /usr/lib/chromium/ chrome-sandbox chromium locales/ [email protected]:/auth_service# /usr/lib/chromium/chrom chrome-sandbox chromium [email protected]:/auth_service# /usr/lib/chromium/chromium –version Chromium 90.0.4430.212 [email protected]:/auth_service# /usr/bin/chromedriver -v ChromeDriver 90.0.4430.212 (e3cd97fc771b893b7fd1879196d1215b622c2bed-refs/branch-heads/[email protected]{#1429}) [email protected]:/auth_service# drivers/chromedriver ..

Read more

I have an issue with Panther in a Symfony 4.4 project. The project have LiipFunctionnalTestBundle on it, but for testing JS as well, i wanted to have Panther. I’ve installed Panther, in my composer i’ve "symfony/panther": "^0.8.0"," and i can extends my class with PantherTestCase or use PantherTestCaseTrait to have Panther and Liip (according to ..

Read more

Here is my test file: <?php // src/tests/UserActionsTest.php namespace AppTests; use SymfonyComponentPantherPantherTestCase; class UserActionsTest extends PantherTestCase { /** * An user can subscribe on the Blog */ public function testRegistration(): void { $client = static::createPantherClient(); $crawler = $client->request(‘GET’, ‘/subscribe’); // This form is generated in JavaScript $client->waitFor(‘#subscribe-form’); // Form submission $client->submitForm(‘Create the account’, [ ‘username’ ..

Read more

I am crawling a website that has a SELECT that are freestanding with no FORM parent and no NAME, only ID. <select id="ff-select-Choice" class="ff-form-control"> <option value="">please select</option> <option value="val1">first</option> <option value="val2">second</option> <option value="val3">third</option> </select> I am able to select it with $myInput = $crawler->filter(‘#ff-select-Choice’); and $myInput->click(); will open the list, but how can I select ..

Read more

I am trying to use Symfony Panther (Symfony 5.1, Windows 10, I have Chrome and Firefox) for the first time and the first line is already not working. With the Github documentation (Basic Usage), here are my errors : $client = SymfonyComponentPantherClient::createChromeClient(); // error : session not created: This version of ChromeDriver only supports Chrome ..

Read more

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()); $session->set(‘_security_main’, serialize($token)); $session->save(); $cookie = new Cookie($session->getName(), $session->getId()); $client->getCookieJar()->set($cookie); // OK, user #1 is logged ..

Read more