I want to load a file through a button that is contains an icon as an image on top of it. When it runs the test it stops just in the attempt to load as if it had clicked on the object and opens the file browser. It is worth mentioning that I have Katalon installed on Linux. I share my script
The variable “file” was where I introduced the path of the file to load
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
WebUI.openBrowser(‘https://pru-sedesu.elmarquesdigital.com/sedesu/’)
WebUI.maximizeWindow(FailureHandling.STOP_ON_FAILURE)
WebUI.setText(findTestObject(‘Object Repository/Page_Inicia sesin en sedesu-pru/input_Usuario o email_username’), ‘user-ventanilla’)
WebUI.setText(findTestObject(‘Object Repository/Page_Inicia sesin en sedesu-pru/input_Contrasea_password’), ‘Biaani01’)
WebUI.click(findTestObject(‘Page_Inicia sesin en sedesu-pru/input_Has olvidado tu contrasea_login’))
WebUI.click(findTestObject(‘Object Repository/Page_SedesuDigital/a_Licencias_side-nav-toggle’))
WebUI.click(findTestObject(‘Object Repository/Page_SedesuDigital/a_Licencias_side-nav-toggle’))
WebUI.click(findTestObject(‘Object Repository/Page_SedesuDigital/i_Pase de Caja_bx bx-edit bx-sm bx-fw’))
WebUI.setText(findTestObject(‘Object Repository/Page_SedesuDigital/input_Pase de caja_form-control custom-inpu_12e579’),
pase_caja)
WebUI.click(findTestObject(‘Object Repository/Page_SedesuDigital/button_Buscar’))
WebUI.setText(findTestObject(‘Page_SedesuDigital/input_nombre_trmite’), ‘FUSIÓN DE PREDIOS’)
WebUI.sendKeys(findTestObject(‘Page_SedesuDigital/input_nombre_trmite’), Keys.chord(Keys.ENTER))
WebUI.click(findTestObject(‘Object Repository/Page_SedesuDigital/label_Acepto el aviso de privacidad’))
WebUI.click(findTestObject(‘Object Repository/Page_SedesuDigital/button_Comenzar registro’))
WebUI.setText(findTestObject(‘Object Repository/Page_SedesuDigital/input__form-control custom-input-form ng-un_5b4895’),
‘juan.angeles@biaani.com’)
WebUI.click(findTestObject(‘Object Repository/Page_SedesuDigital/button_Continuar’))
WebUI.click(findTestObject(‘Object Repository/Page_SedesuDigital/div_Adjuntar trmite llenado a mano’))
WebUI.uploadFile(findTestObject(‘Page_SedesuDigital/button_carga_1’), file)
WebUI.delay(10)
WebUI.doubleClick(findTestObject(‘Object Repository/Page_SedesuDigital/div_FUSIN DE PREDIOS DOCUMENTOS DIGITALIZAD_01389b’))
WebUI.click(findTestObject(‘Object Repository/Page_SedesuDigital/div_notificar’))
WebUI.closeBrowser()
These are the buttons I refer to where I want to load the file
The result of the test shows that the file is being sent but when I run the test it stops showing the linux file browser and does not load the file in the application.