File download takes forever

Test case objective : Go to a certain page. In that page there is two radio button 1) import 2) export. I need to select ‘export’ radio button then click on a submit button to initiate file download. Once the file is downloaded successfully ‘Ok’ button is displayed.

Problem: I get StepFailed exception on click on submit button however submit button was clicked and I see downloaded files in folder but still katalon throws excpetion. Thread wait for 10 minutes to throw exception

Error log:
com.kms.katalon.core.exception.StepFailedException: Unable to send keys ‘’ to object ‘Object path submit button’ (Root cause: org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=75.0.3770.100)
(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 10.0.15063 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_102’
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.35.528161 (5b82f2d2aae0ca…, userDataDir: C:\Users\a6h3lzz\AppData\Lo…}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 75.0.3770.100, webStorageEnabled: true}
Session ID: f5cc5fdfa845103042d15605d355a897)

My Code:

WebUI.click(findTestObject('Object path for radio button. User wants to export configuration))
WebUI.maximizeWindow()
try {
// Method 1 . It failed
WebElement element = WebUiCommonHelper.findWebElement(findTestObject(‘Object path for submit button’), 30)
WebUI.executeJavaScript(“arguments[0].click()”, Arrays.asList(element))

// Method 2 . It also failed
WebUI.click(findTestObject(‘Object path for submit button’))
// Method 3
WebUI.sendKeys((findTestObject(‘Page_Enterprise/ImportExportDialog/input_btnSubmit’), Keys.chord(Keys.ENTER))
}
catch (Exception e) {
// It takes 10 minutes to reach catch block
println(‘Failed to click export button’)
e.printStackTrace()
}
// okay button
TestObject okayButton = findTestObject(‘Object path okay button’)

I think we’re going to need a lot more information.

Read this:

1 Like