#358·Goutte

Select input by name, set value, and click button?

Author: SaintPaddyCreated Oct 4, 2018Updated Dec 7, 2022

For some time now, I've been running into some issues. Perhaps anyone here has an idea.

We've got a portal from a vendor. The URL I'd like to visit looks like: https://server/name/number As I'm not logged in, a login screen will be shown. Username and password need to be filled in, and then clicked on the button. The page will then reload and that contains some values I'd like to grab.

For some reason I can't find out how to fill in the INPUT fields (setValue does not exist), and then click the button.

Attached my form. Anyone nay ideas? Something like this doesn't work, it seems to do a POST or glue the values after the URL.

$form = $crawler->filter('.normal')->form(array(
    'username' => '***','password' => '****!',
));

$crawler = $client->submit($form);
print_r($crawler);

form.txt