-
Notifications
You must be signed in to change notification settings - Fork 309
Open
Labels
Description
I am clicking a link, and it is loading the PDF in Chrome rather than downloading it. In my browser settings (chrome://settings/content/pdfDocuments) i have this turned off; however, with the script it is doing.
I have two questions
- How do I disable this so that the download is forced in my createBrowser ?
- How do I save the PDF that is loading in the tab? I would prefer to save it via script rather than using the Keyboard API, but I tried that, and it is not working for me.
The below code loads the PDF however the keys do not look to work
$page2 = $browser->createPage();
$page2->navigate('http://127.0.0.1:5000/admin/'.$href);
$page2->setDownloadPath('\downloads');
sleep(5);
$page2->keyboard()
->press('control')
->type('s')
->release('Control');
$page2->keyboard()
->type('enter');
$page2->keyboard()
->press('control')
->type('w');
Thanks for any help you can give