@duyluong This is the desired chrome capability settings, note this: “download.default_directory”:“Results/download”
{“CHROME_DRIVER”:{“prefs”:{“browser.download.manager.showWhenStartingbrowser.download.manager.showWhenStarting”:“false”,“download.default_directory”:“Results/download”,“download.directory_upgrade”:true,“download.prompt_for_download”:false,“plugins.always_open_pdf_externally”:true,“profile.default_content_settings.popups”:“0”,“profile.content_settings.exceptions.automatic_downloads.*.setting”:“1”,“property”:true}}}
This is the execution log in text view:
2020-06-12 14:21:39.597 INFO c.k.k.core.webui.driver.DriverFactory - Starting ‘Chrome’ driver
Jun 12, 2020 2:21:39 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using new ChromeOptions() is preferred to DesiredCapabilities.chrome()
2020-06-12 14:21:39.608 INFO c.k.k.c.w.util.WebDriverPropertyUtil - User set preference: [‘prefs’, ‘{browser.download.manager.showWhenStartingbrowser.download.manager.showWhenStarting=false, download.default_directory=Results/download, download.directory_upgrade=true, download.prompt_for_download=false, plugins.always_open_pdf_externally=true, profile.default_content_settings.popups=0, profile.content_settings.exceptions.automatic_downloads.*.setting=1, property=true}’]
2020-06-12 14:21:39.623 INFO c.k.k.core.webui.driver.DriverFactory - Action delay is set to 0 milliseconds
Starting ChromeDriver 81.0.4044.69 (6813546031a4bc83f717a2ef7cd4ac6ec1199132-refs/branch-heads/4044@{#776}) on port 11051
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1591971699.753][SEVERE]: bind() failed: Cannot assign requested address (99)
Jun 12, 2020 2:21:42 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
2020-06-12 14:21:42.153 INFO c.k.k.core.webui.driver.DriverFactory - sessionId = 800ef5f9157443c605635b0ac403463a
2020-06-12 14:21:42.165 INFO c.k.k.core.webui.driver.DriverFactory - browser = Chrome 81.0.4044.113
2020-06-12 14:21:42.166 INFO c.k.k.core.webui.driver.DriverFactory - platform = Linux
2020-06-12 14:21:42.166 INFO c.k.k.core.webui.driver.DriverFactory - seleniumVersion = 3.141.59
2020-06-12 14:21:42.166 INFO c.k.k.core.webui.driver.DriverFactory - proxyInformation = ProxyInformation{proxyOption=NO_PROXY, proxyServerType=HTTP, password=, proxyServerAddress=, proxyServerPort=0, executionList=}
[1591971702.633][SEVERE]: Timed out receiving message from renderer: 0.100
[1591971703.109][SEVERE]: Timed out receiving message from renderer: 0.100
[1591971703.464][SEVERE]: Timed out receiving message from renderer: 0.100
[1591971703.565][SEVERE]: Timed out receiving message from renderer: 0.100
2020-06-12 14:21:43.979 INFO k.k.c.m.CustomKeywordDelegatingMetaClass - com.gh.portal.Common.logon is PASSED
2020-06-12 14:21:43.980 DEBUG testcase.New Test Case - 7: com.gh.portal.Common.downloadReport(requestID)
[1591971706.776][SEVERE]: Timed out receiving message from renderer: 0.100
[1591971706.967][SEVERE]: Timed out receiving message from renderer: 0.100
Test Suites/DebugForJenkins - Chrome - 20200612_142134…0/1(0%)
2020-06-12 14:21:55.045 INFO k.k.c.m.CustomKeywordDelegatingMetaClass - com.gh.portal.Common.downloadReport is PASSED
2020-06-12 14:21:55.046 DEBUG testcase.New Test Case - 8: assert TestUtil.waitUntilFileExist(filePath, 60) == true
Test Suites/DebugForJenkins - Chrome - 20200612_142134…0/1(0%)
Test Suites/DebugForJenkins - Chrome - 20200612_142134…0/1(0%)
Test Suites/DebugForJenkins - Chrome - 20200612_142134…0/1(0%)
Test Suites/DebugForJenkins - Chrome - 20200612_142134…0/1(0%)
2020-06-12 14:22:56.066 ERROR c.k.katalon.core.main.TestCaseExecutor - ? Test Cases/AcceptanceTest/New Test Case FAILED.
Reason:
Assertion failed:
@duyluong any update on this bug? About sample script, you can create any download script in your linux machine, since the same script download fine in mac but not linux, so it’s an issue in linux.
@duyluong@Jass The issue is that our capability settings file set download directory to be Results/Download, see below:
{“CHROME_DRIVER”:{“prefs”:{“browser.download.manager.showWhenStartingbrowser.download.manager.showWhenStarting”:“false”,“download.default_directory”:“Results/download”,“download.directory_upgrade”:true,“download.prompt_for_download”:false,“plugins.always_open_pdf_externally”:true,“profile.default_content_settings.popups”:“0”,“profile.content_settings.exceptions.automatic_downloads.*.setting”:“1”,“property”:true}}}
But in Linux, it’s not working, you have to add project root path, then it will work. This is a bug in Katalon, it should be able to figure out project root path dynamically cross platforms/systems.