Instead of using form we can request with POST/GET, something like https://github.com/phpbb/phpbb3/blob/develop/tests/functional/fileupload_form_test.php#L25
But this can be very inconvenient as we need to define all the request parameters. I think it should work?