java - Setting chrome capabilities in application.properties file using QAF Automation framework is not working -
i'm new using qaf automation framework. followed documentation on page - https://qmetry.github.io/qaf/latest/setting_driver_capabilities.html
my requirement is: have download file in test , download should go project's download folder , not on macbook/test machine's download folder.
i'm using chromedriver , have set chrome capabilities in application.properties file within qaf framework. added below it's not working
chrome.capabilities.profile.default_content_settings.popups=0 chrome.capabilities.download.default_directory=/downloads chrome.capabilities.credentials_enable_service=false chrome.capabilities.profile.password_manager_enabled=false chrome.capabilities.capabilitytype.accept_ssl_certs=true chrome.additional.capabilities={"chrome options":{"args":["--headless - -disable-gpu"]}} i tried directly using chrome.additional.capabilities capabilities wanted set, below, , didn't work either
 chrome.additional.capabilities={"chrome options":{"args":["--allow-  outdated-plugins","--always-authorize-plugins","--headless --disable-  gpu","-disable-extensions"]},"prefs":  [{"profile.default_content_settings.popups":0},  {"download.default_directory":"/downloads"},  {"credentials_enable_service":false},  {"profile.password_manager_enabled":false}]} when execute test, test runs , passes file downloaded macbook download directory , not within project specific download folder i've set using capabilities.
i tried using chromedriver.capabilities instead of chrome.capabilities no success.
can used qaf before, me solving issue?
few correction needs in additional capability value:
- key chrome options chromeoptions
- preferences 1 of option requires map key prefs
- try providing absolute path download directory.
your additional capability should below (make sure there no line break):
 chrome.additional.capabilities={"chromeoptions":{"args":["--allow-  outdated-plugins","--always-authorize-plugins","--headless --disable-  gpu","-disable-extensions"],"prefs":  {"profile.default_content_settings.popups":0,  "download.default_directory":"/usr/workspace/testproject/downloads",  "credentials_enable_service":false,  "profile.password_manager_enabled":false}}} refer chromeoptions-object
Comments
Post a Comment