How to find Chrome download path in Java -


i'm trying write test webdriver using chrome browser, want download file, when click download link, file being downloaded automatically download folder. wondering if there way find out current path of download folder (win / linux) there configuration file chrome keep settings ?

thans

google chrome maintaining 1 config file such custom configuration named preferences in json format.so have read file.you current path of download folder file.

"download": {       "default_directory": "current_path_of_your_download_folder",       "directory_upgrade": true,       "extensions_to_open": "",       "prompt_for_download": false  }, 

parsing json file java read file.

location of configuration file in linux is
/user_home_folder/.config/chromium/default/preferences , in windows is
c:\users\user_account\appdata\local\google\chrome\user data\default\preferences


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -