Skip to main content

Upload files for desktop browser

To upload files to a TestCloud machine, you can use the LocalFileDetector class.

Note:

The keyword is also accessible through the Katalon TestCloud Keywords plugin on Katalon Store. You can install the plugin to automatically load all TestCloud keywords into your Katalon project, without having to manually define them. To install the plugin, visit: Katalon TestCloud keywords.

Sample code:
import org.openqa.selenium.WebDriver
import org.openqa.selenium.remote.LocalFileDetector
import org.openqa.selenium.support.events.EventFiringWebDriver

import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.selenium.driver.CRemoteWebDriver


EventFiringWebDriver driver = DriverFactory.getWebDriver()
WebDriver wrappedDriver = driver.getWrappedDriver()

if (wrappedDriver.class == CRemoteWebDriver) {
wrappedDriver.setFileDetector(new LocalFileDetector())
}
Was this page helpful?