Getting error groovy.lang.MissingMethodException: No signature of method: static

I am getting the error groovy.lang.MissingMethodException: No signature of method: static
when i am running my first program in Katalon. How do i solve the error.

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

WebUI.openBrowser(“http://newtours.demoaut.com/”)

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Page_Welcome Mercury Tours/UserName’,“demo2020”))
WebUI.setEncryptedText(findTestObject(‘Object Repository/Page_Welcome Mercury Tours/Password’,“demo1”))
WebUI.click(findTestObject(‘Object Repository/Login’))
WebUI.closeBrowser()

@priyadp22

Can you share us the full execution log in the Console tab?

You may have the wrong data type in the following:

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Page_Welcome Mercury Tours/UserName’,“demo2020”))

The second parameter in the above statement seems to be a “String” when it should be an “int” for timeout. Perhaps it should be:

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Page_Welcome Mercury Tours/UserName’),10)

Hover your mouse over the wait statement and an Intellisense window should appear with the various data types of the parameters. (You may need to click on the KS window to ensure you are in KS.)

Still getting same error, the same code works fine with record and run but manual it throws the error.

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

WebUI.openBrowser(“http://newtours.demoaut.com/”)

WebUI.waitForElementVisible(findTestObject(‘Object Repository/Page_Welcome Mercury Tours/UserName’),‘demo2020’)
WebUI.setEncryptedText(findTestObject(‘Object Repository/Page_Welcome Mercury Tours/Password’),‘demo1’)
WebUI.click(findTestObject(‘Object Repository/Login’))
WebUI.closeBrowser()