I'm running Serenity BDD tests inside a Docker container as part of an Azure Pipeline. The tests are executed using Microsoft Edge (via Selenium Grid), and the video recordings are published as artifacts to help debug failures.
Currently I have the problem, that the "Save as" Screen is shown after a link gets clicked which downloads a PDF.
I've tried many things in my serenity.conf file like plugin.always_open_pdf_externally = false or download.prompt_for_download = false but nothing seems to work.
I guess the problem is the docker because the screenshots from Serenity BDD don't show any signs of this screen because it's outside the DOM.
Has anyone encountered this issue before with Serenity BDD or Selenium in Docker? Is there a reliable way to bypass the "Save As" dialog when downloading PDFs in Edge? Any tips on configuring Edge or the Docker container to handle downloads silently would be greatly appreciated.
My settings:
#serenity.conf
webdriver {
driver = remote
autodownload = true
remote {
driver = edge
}
capabilities {
browserName = "MicrosoftEdge"
acceptInsecureCerts = true
"ms:edgeOptions" {
args = ["test-type", "ignore-certificate-errors", "inPrivate", "disable-infobars", "disable-gpu", "no-sandbox",
"disable-default-apps", "disable-popup-blocking", "window-size=1600,1000"]
prefs {
download {
default_directory = "/home/seluser/Downloads/"
directory_upgrade = true
}
download.prompt_for_download = false
plugins.always_open_pdf_externally = false
profile.default_content_settings.popups = 0
safebrowsing.enabled = true
}
}
}
timeouts {
implicitlywait = 10000
pageLoad = 600000
implicit = 10000
}
}
#docker-compose.yml
edge_video:
image: selenium/video:ffmpeg-4.3.1-20231020
container_name: edge_video
volumes:
- c:/temp/selenium_videos:/videos
depends_on:
- edge
environment:
- DISPLAY_CONTAINER_NAME=edge
- FILE_NAME=edge_video.mp4