I am executing my playwright test cases on LambdaTest platform. I have a test case in which I need to download a pdf file. When I run the test case on my local machine I am able to download the pdf as while launching the chrome browser on local i am setting:
defaultPreferences = {
plugins: {
always_open_pdf_externally: true,
}
On lambdatest I dont see any such option while connecting to browser and hence instead file getting downloaded it is displayed in Chrome’s internal pdf viewer.
Below are the setting which I am using for launching the chrome on LambdaTest:
const capabilities = {
browserName: `${LTBrowser}`,
browserVersion: "latest",
"LT:Options": {
platform: `${process.env.OPERATING_SYSTEM}`,
build: "IPAT",
name: `${this.tcName}`,
tags: [`${this.tag}`],
user: `${process.env.USER_ID}`,
accessKey: `${process.env.ACCESS_KEY}`,
network: network_option,
video: video_option,
console: console_option,
visual: visual_option,
resolution: `${process.env.RESOLUTION}`,
idleTimeout: Number(`${process.env.IDLE_TIMEOUT}`),
browserVersion: "latest",
},
}
const browserInstance = await chromium.connect({
wsEndpoint: `wss://cdp.lambdatest.com/playwright?capabilities=${encodeURIComponent(
JSON.stringify(capabilities)
)}`,
})
Can anyone please let me know how I can enable the pdf download?