⚠️ 操作异常:No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.getAttribute()

⚠️ 操作异常:No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.getAttribute() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject, String, Integer)

这个错误是因为 WebUI.getAttribute() 方法的参数使用不正确。

Katalon 的 WebUI.getAttribute() 方法只接受两个参数(TestObject 和属性名),而代码中传入了第三个参数(等待时间),导致方法签名不匹配

源代码

 String currentClass = WebUI.getAttribute(checkbox, "class", 5) ?: ""

修改后的代码

 String currentClass = WebUI.getAttribute(checkbox, "class") ?: ""

image

 

posted @ 2025-08-27 11:14  zrswheart  阅读(8)  评论(0)    收藏  举报