panther
panther copied to clipboard
Test files upload
Hi, I would like to test the content of downloaded file as a pdf, for exemple
I have seen here (#189) that there is some hacks but can't reproduce them. I tried to make direct access to the url but it doesn't keep the login context.
Can I have some examples, please ?
Thank you
Here is an example with Chrome:
$chromeOptions = new ChromeOptions();
$prefs = [
'download.default_directory' => '/tmp/foobar',
'download.prompt_for_download' => 'false',
];
$chromeOptions->setExperimentalOption('prefs', $prefs);
$this->client = static::createPantherClient([],
[],
[
'capabilities' => [
ChromeOptions::CAPABILITY => $chromeOptions,
],
]);