Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

submit form isn't submitting #602

Open
dvdknaap opened this issue Sep 8, 2023 · 0 comments
Open

submit form isn't submitting #602

dvdknaap opened this issue Sep 8, 2023 · 0 comments

Comments

@dvdknaap
Copy link

dvdknaap commented Sep 8, 2023

In my phpunit test i want to signin a form and then submit but the submit function isn't doing anything.

In my test i go to the login page take a screenshot.
fillin the form and submit and take another screenshot, i see that the form is filled in what i've entered but it's not submitting.

        $client = PantherClient::createFirefoxClient(options: ['capabilities' => ['acceptInsecureCerts' => true]]); 
        $crawler = $client->request('GET', 'https://dockerWebsite/login');

        $this->createScreenshot($client, 'screen.png');

        $loginButton = $crawler->selectButton('Sign in');
        $loginButton->form()->setValues([
         'email' => 'test@test.nl',
         'password' => 'test',
        ]);

        $submitted = $loginButton->submit();

        $this->createScreenshot($client, 'screen2.png');

screen.png
image

screen2.png
image

Edit:
when i replace $loginButton->submit() to $client->submit($loginButton->form()); it work so it looks like it's a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant