serenity-bdd/serenity-core

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Serenity Browser Auto Download in Docker Container #3297

pdevaraj14 posted onGitHub

Discussed in https://github.com/serenity-bdd/serenity-core/discussions/3293

<div type='discussions-op-text'>

<sup>Originally posted by pdevaraj14 October 19, 2023</sup> Hi, can anyone please tell me if its possible for the selenium webdrivermanager to auto download the browser itself in a linux environment. I'm able to get it locally working on windows but it seems like only the drivers are downloading in the linux image in docker container. The serenity conf file im using is the following:

`serenity { take.screenshots = FOR_EACH_ACTION }

environment = firefox

environments { chrome { webdriver { autodownload = true capabilities { proxy { proxyType = "autodetect" } browserName = "chrome" browserVersion = "stable" acceptInsecureCerts = true "goog:chromeOptions" { args = ["test-type", "ignore-certificate-errors", "start-maximized", "headless=new" "incognito", "disable-infobars", "disable-gpu", "disable-default-apps", "disable-popup-blocking", "disable-dev-shm-usage", "no-sandbox"] } } } } edge { webdriver { capabilities { browserName = "edge" "ms:edgeOptions" { args = ["test-type", "ignore-certificate-errors", "headless", "incognito", "disable-infobars", "disable-gpu", "disable-default-apps", "disable-popup-blocking"] } } } } firefox { webdriver { autodownload = true capabilities { proxy { proxyType = "autodetect" } browserName = "firefox" browserVersion = "118" pageLoadStrategy = "normal" acceptInsecureCerts = true unhandledPromptBehavior = "dismiss" "moz:firefoxOptions" { args = ["--headless"], prefs { "javascript.options.showInConsole": false }, log {"level": "info"}, } } } } }`</div>


Selenium doesn't do this - it is your responsibility to ensure that the correct browsers are installed.

posted by wakaleo over 1 year ago

Thank you for the response wakaleo. I was following the documentation at page: https://www.selenium.dev/blog/2023/whats-new-in-selenium-manager-with-selenium-4.11.0/ which states that there is automated browser management. I was able to get the automated browser management working locally but its not behaving the same in a docker environment and was just wondering if there is a specific proxy setting i have to use in the Serenity.conf file to enable it. Thanks again.

posted by pdevaraj14 about 1 year ago

Nothing that I am aware of (there might be a W3C option but I haven't seen it mentioned anywhere). If it works locally I suspect it would be a question of configuring your Docker image rather than Serenity or Selenium

posted by wakaleo about 1 year ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests