I try to use WebUI uploadFile keyword but can’t make it work.
For example, my testObject is ‘Configuration/Client/div_insert_photo’
On my script, I verify the testObject by:
WebUI.verifyElementPresent(findTestObject(‘Configuration/Client/div_insert_photo’), 2)
or
text = WebUI.getText(findTestObject(‘Configuration/Client/div_insert_photo’))
or even click on the object, this will bring the browser to choose the file for uploading
WebUI.click(findTestObject(‘Configuration/Client/div_insert_photo’))
But it always failed when I try to to use uploadFile keyword to this testObject:
WebUI.uploadFile(findTestObject(‘Configuration/Client/div_insert_photo’), ‘/Users/[myhome]/resources/data/desktop.jpg’, _
_ FailureHandling.CONTINUE_ON_FAILURE)
or also failed with sendKeys keyword
WebUI.sendKeys(findTestObject(‘Configuration/Client/div_insert_photo’), ‘/Users/[myhome]/resources/data/desktop.jpg’, _
_ FailureHandling.CONTINUE_ON_FAILURE)
with error:
2019-09-30 10:52:55.783 DEBUG M-104 Client Configuration - Upload Logo - 9: uploadFile(findTestObject(“Configuration/Client/div_insert_photo”), “/Users/[myhome]/resources/data/desktop.jpg”, CONTINUE_ON_FAILURE)
2019-09-30 10:52:56.273 ERROR c.k.k.core.keyword.internal.KeywordMain - Unable to upload file ‘/Users/[myhome]/resources/data/desktop.jpg’ to object ‘Object Repository/Configuration/Client/div_insert_photo’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to upload file ‘/Users/[myhome]/resources/data/desktop.jpg’ to object ‘Object Repository/Configuration/Client/div_insert_photo’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.UploadFileKeyword.uploadFile(UploadFileKeyword.groovy:87)
at com.kms.katalon.core.webui.keyword.builtin.UploadFileKeyword.execute(UploadFileKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.uploadFile(WebUiBuiltInKeywords.groovy:2931)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$uploadFile$2.call(Unknown Source)
at Client Configuration - Upload Logo.run(Client Configuration - Upload Logo:33)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.RawTestScriptExecutor.runScript(RawTestScriptExecutor.java:34)
at com.kms.katalon.core.main.RawTestScriptExecutor.doExecute(RawTestScriptExecutor.java:29)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestCaseMain.runTestCaseRawScript(TestCaseMain.java:151)
at com.kms.katalon.core.main.TestCaseMain$runTestCaseRawScript$0.call(Unknown Source)
at TempTestCase1569865969245.run(TempTestCase1569865969245.groovy:64)
Caused by: org.openqa.selenium.ElementNotInteractableException: element not interactable
(Session info: chrome=77.0.3865.90)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:25:53’
System info: host: ‘MY-MAC’, ip: ‘xxxxxx%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.14.6’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.core.webui.driver.ExistingRemoteWebDriver
…
If anyone has any idea about this error? thank much in advance