No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click()

Hello,
why I have this error?

   No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject, java.lang.Integer) values: [TestObject - 'Object Repository/03-Random/invita utente/invita utente', ...]
Possible solutions: click(com.kms.katalon.core.testobject.TestObject), click(com.kms.katalon.core.testobject.TestObject, com.kms.katalon.core.model.FailureHandling), check(com.kms.katalon.core.testobject.TestObject), check(com.kms.katalon.core.testobject.TestObject, com.kms.katalon.core.model.FailureHandling), back(), wait()
	at random.self_sender_invita_utente.Clicco_su_invita_utente(self_sender_invita_utente.groovy:65)

package random

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 com.kms.katalon.core.annotation.Keyword

import com.kms.katalon.core.checkpoint.Checkpoint

import com.kms.katalon.core.checkpoint.CheckpointFactory

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords

import com.kms.katalon.core.model.FailureHandling

import com.kms.katalon.core.testcase.TestCase

import com.kms.katalon.core.testcase.TestCaseFactory

import com.kms.katalon.core.testdata.TestData

import com.kms.katalon.core.testdata.TestDataFactory

import com.kms.katalon.core.testobject.ObjectRepository

import com.kms.katalon.core.testobject.TestObject

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords

import internal.GlobalVariable

import MobileBuiltInKeywords as Mobile

import WSBuiltInKeywords as WS

import WebUiBuiltInKeywords as WebUI

import org.openqa.selenium.WebElement

import org.openqa.selenium.WebDriver

import org.openqa.selenium.By

import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory

import com.kms.katalon.core.webui.driver.DriverFactory

import com.kms.katalon.core.testobject.RequestObject

import com.kms.katalon.core.testobject.ResponseObject

import com.kms.katalon.core.testobject.ConditionType

import com.kms.katalon.core.testobject.TestObjectProperty

import com.kms.katalon.core.mobile.helper.MobileElementCommonHelper

import com.kms.katalon.core.util.KeywordUtil

import com.kms.katalon.core.webui.exception.WebElementNotFoundException

import cucumber.api.java.en.And

import cucumber.api.java.en.Given

import cucumber.api.java.en.Then

import cucumber.api.java.en.When

import org.apache.commons.lang.RandomStringUtils;

class invita_utente {

/**

* The step definitions below match with Katalon sample Gherkin steps

*/

@Given("Come S voglio loggarmi con username e password")

def Come_S_voglio_loggarmi_con_username_e_password() {

WebUI.callTestCase(findTestCase('Test Cases/Reuse Test Case/1. Login - S'), [:], FailureHandling.OPTIONAL )

}

@When("Clicco su Invita utente")

def Clicco_su_invita_utente() {

WebUI.click(findTestObject('Object Repository/03-Random/invita utente/invita utente'), 0)

}

@Then("Invito un utente")

def Invito_un_utente() {

WebUI.click(findTestObject('Object Repository/03-Random/invita utente/ruolo utente'), 0)

WebUI.click(findTestObject('Object Repository/03-Random/invita utente/mittente'), 0)

String randomNome = RandomStringUtils.randomAlphabetic(10)

WebUI.setText(findTestObject('Object Repository/03-Random/invita utente/ruolo utente'), randomNome)

WebUI.callTestCase(findTestCase('Test Cases/random email'), [:], FailureHandling.OPTIONAL)

WebUI.click(findTestObject('Object Repository/03-Random/invita utente/invitation button'), 0)

}

}

solved: ```
WebElement element = WebUiCommonHelper.findWebElement(findTestObject(‘your/object’),30)
WebUI.executeJavaScript(“arguments[0].click()”, Arrays.asList(element))

Remove the , 0

3 Likes

thank you very much! :grinning:

1 Like