新版本的Chrome不包括-Mine类型-application/ pdf (通过量角器运行时),这将允许我在浏览器上查看pdf并通过量角器测试url,但它会自动下载并关闭选项卡。如果你通过手动打开铬并点击链接,它会打开下一个选项卡中的pdf,而不是自动下载。
手动运行chrome有以下扩展::
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 runChrome自动扩展-由Protractor运行(这里缺少MIME类型应用程序/ pdf扩展,允许浏览器在浏览器上查看浏览器上的pdf,该浏览器通过量角器直接连接浏览器运行)
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在铬上也有类似的问题,但还没有解决方案,:https://productforums.google.com/forum/#!topic/chrome/A3XrBbHD80U
发布于 2015-07-15 21:49:22
也许,如果您不关心测试运行时的警告消息,那么这应该可以:
"desiredCapabilities": {
"chromeOptions": {
"excludeSwitches": [ "test-type" ]
}
}https://stackoverflow.com/questions/30262378
复制相似问题