Reputation: 49
new version Chrome browser does not includes -Mine type - application/pdf(when run through protractor), which would allow me to view pdf on browser and test the url through protractor, but its automatically download and close the tab. If you go through manually open the chrome and click link it opens the pdf in next tab and dont download automatically.
Manually run chrome has following extension::
Chrome PDF Viewer (2 files)
Name: Chrome PDF Viewer
Version:
**Location: chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/
Type: BROWSER PLUGIN
Disable
MIME types:
MIME type Description File extensions
application/pdf
.pdf**
Name: Chrome PDF Viewer
Description: Portable Document Format
Version:
Location: internal-pdf-viewer
Type: PPAPI (out-of-process)
Disable
MIME types:
MIME type Description File extensions
application/x-google-chrome-pdf Portable Document Format
.pdf
Disable Always allowed to run
Chrome Automation Extension - Run by Protractor (MIME type - application/pdf extension is missing here which allow the browser to view pdf on browser on the chrome automation extension run by direct connect browser by protractor)
Chrome PDF Viewer
Portable Document Format
Name: Chrome PDF Viewer
Description: Portable Document Format
Version:
Location: internal-pdf-viewer
Type: PPAPI (out-of-process)
Disable
MIME types:
MIME type Description File extensions
application/x-google-chrome-pdf Portable Document Format
.pdf
Disable Always allowed to run
There is a similar issue on chrome but no solution yet : https://productforums.google.com/forum/#!topic/chrome/A3XrBbHD80U
Upvotes: 0
Views: 1397
Reputation: 200
Perhaps if you don't care about the warning message when the test are running then this should work:
"desiredCapabilities": {
"chromeOptions": {
"excludeSwitches": [ "test-type" ]
}
}
Upvotes: 0