We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems that the method set_boolean_preference doesn't get the job done since the pdf viewer is still active.
If i change 'pdfjs.disabled' through 'about:config' in the Firefox controlled by Selenium, it works fine.
This is the code i'm working with:
#!/bin/perl use warnings; use strict; use Selenium::Firefox; use Selenium::Firefox::Profile; my $profile = Selenium::Firefox::Profile->new(); $profile->set_preference( "browser.download.folderList" => 2, "browser.download.dir" => "/home/", "browser.helperApps.neverAsk.saveToDisk" => "application/pdf", ); $profile->set_boolean_preference( "pdfjs.disabled" => 1 # <---------- doesnt seem to work ); my $driver = Selenium::Firefox->new( firefox_profile => $profile ) or die $!; print $profile->get_preference("pdfjs.disabled")."\n"; eval { $driver->get("https://www.orimi.com/pdf-test.pdf"); }; sleep 5; if ($@) { print "$@\n"; } $driver->shutdown_binary;
Maybe i'm missing something but as far as i can tell, it should work.
Thanks in advance !
The text was updated successfully, but these errors were encountered:
2 questions:
Does it work when you provide JSON::True instead of 1? Does the same work with set_preference()?
JSON::True
1
Sorry, something went wrong.
No branches or pull requests
It seems that the method set_boolean_preference doesn't get the job done since the pdf viewer is still active.
If i change 'pdfjs.disabled' through 'about:config' in the Firefox controlled by Selenium, it works fine.
This is the code i'm working with:
Maybe i'm missing something but as far as i can tell, it should work.
Thanks in advance !
The text was updated successfully, but these errors were encountered: