[WebUI] Upload File

I have problem with the same relation path, the test case not able to run in Windows and Linux with the same path.

So the solution here:

import java.nio.file.Path as Path
import java.nio.file.Paths as Paths

String filePath = RunConfiguration.getProjectDir() + '/Data Files/test-doc.pdf'

Path absolutePath = Paths.get(filePath)

String absolutePathStr = absolutePath.toString()

WebUI.uploadFile(findTestObject('object'), absolutePathStr)