Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative path not working in Serenity.conf file for Chrome preferences default download Directory #3582

Open
BindyaS opened this issue Dec 4, 2024 · 1 comment

Comments

@BindyaS
Copy link

BindyaS commented Dec 4, 2024

What happened?

I need to customize the location where a file is downloaded, and hence used the following solution in Serenity.conf file
"goog:chromeOptions" {
args = ["remote-allow-origins=*"]
prefs {
download.default_directory = "..//custom_downloads"
}
}
This is not working as expected. if i use the absolute path it is working fine.

I also tried using environment variable in the file,
webdriver {
capabilities {
...
"goog:chromeOptions" {
prefs {
download.default_directory = ${HOME}/some/download/dir
download.prompt_for_download = true
}
}
}
but this errors out saying Could not resolve substitution to a value: ${HOME}, even though the value for HOME is already set.

What did you expect to happen?

expect the download.default_directory = "..//custom_downloads" to work even for relative path and not just absolute path

Serenity BDD version

4.1.15

JDK version

11

Execution environment

Windows OS, Chrome browser

How to reproduce the bug.

Serenity.conf with the follwing settings, and download location set to relative path within the project folder
webdriver {
driver = chrome
capabilities {
browserName = "chrome"
acceptInsecureCerts = true
"goog:chromeOptions" {
args = ["remote-allow-origins=*"]
prefs {
download.default_directory = "..//custom_downloads"
}
}
}
loggingPrefs {
browser = "ALL"
driver = "ALL"
}
}

How can we make it happen?

Add it to the Serenity BDD backlog and wait for a volunteer to pick it up

@BindyaS BindyaS changed the title Relative path not working for in Serenity.conf file for Chrome preferences default download Directory Relative path not working in Serenity.conf file for Chrome preferences default download Directory Dec 4, 2024
@iamshiva003
Copy link

Hi I am facing the same issue did you get the solution for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants