How to open pdf in chromedriver 2.15 without downloading it - pdf

I recently upgraded to Chromedriver 2.15
Now, when I click a link to a pdf file it is auto-downloading instead of displaying in a new tab as before.
<a id="my_pdf_file" format="pdf" target="_blank" href="/my_pdf_file.pdf">My PDF File</a>
Is there a way to resume the old behavior of displaying the pdf in a new tab?

This is currently an open issue with Chrome, not Chromedriver:
Unable to open a PDF file in chrome since upgrading to v 42.0.2311.90
At some point between M41 and M42, the behavior of the --test-type switch was changed so that PDFs are downloaded instead of displayed.
I updated to the latest version of the dev branch of Chrome 44.0.2391.0 dev-m (64 bit), ran a test in Selenium that opens a PDF, and can confirm that PDFs are opening in new tabs by default.
This was tested using the following:
Chrome 44.0.2391.0 dev-m (64 bit)
Selenium 2.45
Chrome Driver 2.15
So, you can either use the dev version of Chrome until the release version catches up, try one of the workarounds in the link above, or wait with the knowledge that it will get fixed soon.

This is how you define a Chrome profile with Watir
This is the chromedriver capabilities page
I don't see right off the way to enable/disable the Chrome PDF viewer (chrome://plugins/)
But, you can set up your own profile - see the 'Use custom profile' section.

Related

Website behavior in Chrome instance launched using ChromeDriver is not same as in regular Chrome

I am preparing a simple cucumber/selenium based application which launches a new browser, brings on the login page of Target.com and attempts to login.
I was able to bring up the Target website home page, traverse to login page and fill up credentials. But the button click on "Sign In" was not working. Just to see the behavior, i tried manually logging in to Target website(in the browser launched by the application) using the credentials and noticed, the "Sign In" button does not work. If i launch Chrome regularly as an independent application, it works.
I checked that JS is enabled in the Chrome launched using ChromeDriver. What else could be an issue? The website url is : https://www.target.com (click on Sign In on top right followed by Sign In in the menu to bring login page. The "Sign in" button on the login page is the one giving problem)
Using the following:
ChromeDriver 73.0.3683.20
Chrome Application Version: 74.0.3729.169
I just tried to instantiate a driver navigate to the login url and do a click to the login button and it works correctly.
Probably your currently chromedriver (73.0.3683.20) can't automate your chrome version (74.0.3729.169) try to upgrade the chromedriver and be aware that chrome updates automatically
UPDATE:
Just checked chromedriver doc and your chromedriver version only works form chrome 73
Issue : Your Chrome Browser Version is 74 and Your framework is having ChromeDriver Binary v73.0.3683.20 which supports Chrome Browser v73
Solution : Update your ChromeDriver Binary Version to v74.0.3729.6
Please have a look at Chrome Browser Release Section : Chrome Browser vs ChromeDriver Binary and follow below information -
If you are using Chrome version 75, please download ChromeDriver 75.0.3770.8
If you are using Chrome version 74, please download ChromeDriver 74.0.3729.6 (You shall follow this)
If you are using Chrome version 73, please download ChromeDriver 73.0.3683.68
For older version of Chrome, please see this discussion for the version of ChromeDriver that supports it.
Hope following above would resolve your issue.

How to Enable Abode flash player at beginning for selenium latest version(Chrome Version 71.0.3578.98 (Official Build) (64-bit))

While Executing Selenium Script by using chrome webdriver, due to "adobe flash player" I am not able to execute flow.
Can someone help me on this?
I have attached Screenshot for reference too:

Version compatibility of Firefox and the latest Selenium IDE (2.9.1.1-signed)

I visited https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/
to install the latest Selenium IDE (v 2.9.1) in Firefox.
My Firefox version is 54 (64-bit)
OS: Windows 10 Pro 64-bit (10.0, Build 14393)
But unfortunately "Add to Firefox" button was shown disabled on the site https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/
On that site NOTE was found as:
Note: Selenium IDE will NOT work on Firefox version 55 onwards. Please stay on Firefox version 54 or older.
What can I do to install Selenium IDE on FF 54?
Sad but true, It is no secret by now that Selenium IDE will be deprecated. In fact, it has already stopped working since Firefox 55. Here are some potential replacements that you may consider applying to your project:
Robot Framework
Katalon Studio
Protractor
TestProject
Good luck and Good bye Legend.
I think Firefox is not supported Selenium IDE after 53 or 54 version, I have read that blog
https://seleniumhq.wordpress.com/2017/08/09/firefox-55-and-selenium-ide/
Firefox 55 doesn't support Selenium IDE 2.9.1. FF 54 and less are OK.
Installation Selenium IDE on FF 54:
1. Open Firefox 54 and visit https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/
2. Click "Download Anyway" link to download (In my case, it was selenium_ide-2.9.1-fx.xpi)
Open .xpi file you download in Firefox 54 -> Click Install and then Restart Now according to following interface:
I faced the similar issues few weeks ago.Firefox version 55 doesn't support Selenium IDE. You need to downgrade your Firefox browser to Firefox version 54, 53 or below.
For doing so, please refer the link below
https://support.mozilla.org/en-US/kb/install-older-version-of-firefox
Also, you need to delete all your old firefox data before installing older version because it might not work if you don't do so.
Then finally you can add Selenium IDE and it works fine.
I need to run Firefox 54 with Selenium but, like the others on this question, wasn't able to easily install Selenium. I did find a way to do this without going to a 3rd party site by copying the XPI download link (just right click on the disabled Add to Firefox button in the Firefox Add-ons page and copy the location), downloading it within Chrome or another browser, and finally just drag and drop the XPI into Firefox. That worked for me, hope this helps someone else.
Ironically, the best versions of selenium and Firefox that work better, powerful and with more options (according to my experience), are those, Firefox 54.0.1 and selenium 2.9.1. Despite they are deprecated. So I understand well your question and need.
Here you have a trick to install that Selenium version in that Firefox version, getting away the inactive add-on button:
Download manually the selenium version 2.9.1 (as a file) and then add it manually through "Install Add-on from file" in Firefox in the section "Extensions".
This is the link to download selenium 2.9.1:
https://ui.vision/howto/getseleniumide

How to install Selenium IDE in Mozilla Firefox

I tried to install Selenium IDE in Firefox but unable to install. Please help me. My Firefox version: 47.0.2 while install IDE button is disabled please help me.
You just need to restart as suggested in your screenshot. If that doesn't helps, install the latest version of firefox in your computer.
Also, in case, if you require how to do so, following link provides detailed steps to download and install selenium ide.
Link providing detailed steps to download and install selenium webdriver
Below are shared steps to Download and Install selenium IDE for Firefox browsers. Make sure to install the latest version of Selenium IDE with an updated version of Mozilla Firefox.
1. Launch the Mozilla Firefox browser.
2. Open URL https://addons.mozilla.org/en-us/firefox/addon/selenium-ide/
It will redirect you to the official add-on page of Firefox
3. Click on the "Add to Firefox" button.
Add to Firefox button
4. A pop-up dialog box will be appeared asking you to add Selenium IDE as an extension to your Firefox browser.
5. Click on the "Add" button.
Dialog box
6. Restart the Firefox browser.
7. Go to the top right corner of your Firefox browser and look for the Selenium IDE icon.
enter image description here
8. Click on that icon to launch Selenium IDE.
enter image description here

How to open local html file by Selenium Safari WebDriver on macOS?

I have tried:
safariDriver.get("file:///Users/pathToMyHtml/index.html");
safariDriver.get("/Users/pathToMyHtml/index.html");
but none of them worked. I use Java and macOS Sierra.
(If I open a page from http:// it's working)
The root cause is Selenium version. You need to upgrade Selenium to version 3++.
It works fine on my machine with Selenium 3.4.
See issue at: https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/3773