Aber ich möchte mehrteiligen Code, den ich mit meiner Version verwenden kann
Dies ist der Teil meiner Skript-HTTP-Formulardaten
HttpFormDataBodyContent multipartBodyContent = new HttpFormDataBodyContent(new ArrayList())
String productCodeValue = "SCF-DF"
String instrumentTypeValue = "Invoice"
String personaValue = "Seller"
File fileToUpload = new File("C:/Users/Lenovo/scf-4/SCF4 Archive/Data Files/finance_upload.xlsx")
String filePartName = "file"
multipartBodyContent.addTextBodyPart("productCode", productCodeValue)
multipartBodyContent.addTextBodyPart("instrumentType", instrumentTypeValue)
multipartBodyContent.addTextBodyPart("persona", personaValue)
multipartBodyContent.addFilePart(filePartName, fileToUpload)
und das ist das ständige Problem, mit dem ich seit letzter Woche konfrontiert bin
2025-10-29 14:44:38.254 FEHLER c.k.katalon.core.main.TestCaseExecutor –
Grund:
groovy.lang.MissingMethodException: Keine Signatur der Methode: com.kms.katalon.core.testobject.impl.HttpFormDataBodyContent.addTextBodyPart() gilt für Argumenttypen: (String, String) Werte: [productCode, SCF-DF]
at API_001_invoice upload.run(API_001_invoice upload:52)
Mobile version