No signature of method: static com.kms.katalon.core.configuration.RunConfiguration.getOverridingGlobalVariable()

Hi,

when I run my test case in Jenkins I get the following error sometimes, but not always which is why I think it is a bug in Katalon Studio:

Test Cases/XYZ because (of) (Stack trace: groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.configuration.RunConfiguration.getOverridingGlobalVariable() is applicable for argument types: (java.lang.String) values: [Login_to_Tool] at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1503) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1489) at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at internal.GlobalVariable.<clinit>(GlobalVariable.groovy:124) at sun.misc.Unsafe.ensureClassInitialized(Native Method) at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43) at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156) at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088) at java.lang.reflect.Field.getFieldAccessor(Field.java:1069) at java.lang.reflect.Field.get(Field.java:393) at org.codehaus.groovy.reflection.CachedField.getProperty(CachedField.java:54) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1805) at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3735) at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:51) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296) at Script1543237758265.run(Script1543237758265.groovy:26) at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183) at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108) at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294) at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285) at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264) at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256) at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200) at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99) at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:60) at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy) at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54) at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:81) at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:45) at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53) at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1469) at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141) at Script1543237758061.run(Script1543237758061.groovy:24) at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183) at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108) at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294) at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285) at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264) at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256) at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200) at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:129) at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:112) at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:81) at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:142) at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141) at TempTestSuite1546614875646.run(TempTestSuite1546614875646.groovy:36) at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263) at groovy.lang.GroovyShell.run(GroovyShell.java:518) at groovy.lang.GroovyShell.run(GroovyShell.java:507) at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653) at groovy.ui.GroovyMain.run(GroovyMain.java:384) at groovy.ui.GroovyMain.process(GroovyMain.java:370) at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129) at groovy.ui.GroovyMain.main(GroovyMain.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131) )

The globa variable “Login_to_Tool” is an URL like:
https://xxx.xyz.xxx/xxx/xxx?service=https://abc.server.lan:/tool/

Again: It works sometimes, like 50/50, hence probably a bug, because if there would be an actual issue with the URL, then it should never work.

Is there a workaround or anythin I can change to make the execution stable?

Thank you,
Dennis

Thank you for the report. We will take a look. Would it be possible for you to share the scripts?

@Loan_Tran @Alice

Hi @Dennis_Raunitschke,
According to the log
“No signature of method: static com.kms.katalon.core.configuration.RunConfiguration.getOverridingGlobalVariable() is applicable for argument types: (java.lang.String) values: [Login_to_Tool]”, it means RunConfiguration.getOverridingGlobalVariable() has not imported yet. So, try to imported the library by the line “import com.kms.katalon.core.configuration.RunConfiguration” first then run the script. If you still meet the issue, share us your script for further investigation.

1 Like

Hi @Loan_Tran,
thanks for the suggestion, but unfortunately the problem still occurs after I added the library.

Here is a the current Error Message and below are the scripts:

Note: There error occurs in the Log In test case that is called from the main test case

01-07-2019 11:52:44 AM - [PASSED] - Browser is opened with url: ‘’
01-07-2019 11:52:44 AM - [END] - End action : openBrowser
01-07-2019 11:52:44 AM - [START] - Start action : Statement - If (Environment == “Test1” || Environment == “Test2”)
01-07-2019 11:52:44 AM - [END] - End action : Statement - If (Environment == “Test1” || Environment == “Test2”)
01-07-2019 11:52:44 AM - [ERROR] - Test Cases/Tool/Tool_log_in FAILED because (of) (Stack trace: groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.configuration.RunConfiguration.getOverridingGlobalVariable() is applicable for argument types: (java.lang.String) values: [Login_to_Tool]

Main Test case:

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable as GlobalVariable

WebUI.callTestCase(findTestCase(‘Tool/Tool_log_in’), [:], FailureHandling.STOP_ON_FAILURE)

WebUI.click(findTestObject(‘Tool/Page_1/a_1’))

WebUI.waitForElementNotVisible(findTestObject(‘Tool/General_Objects/Block_UI_Wrapper’), 30, FailureHandling.OPTIONAL)

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/Filter_Link’), 0)

WebUI.click(findTestObject(‘Tool/General_Objects/Filter_Link’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/Filter_Body’), 0)

WebUI.verifyElementVisible(findTestObject(‘Tool/General_Objects/Filter_Body’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/First_deal_in_list’), 0)

WebUI.click(findTestObject(‘Tool/General_Objects/First_deal_in_list’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/first_deal_in_list_details’), 0)

WebUI.verifyElementVisible(findTestObject(‘Tool/General_Objects/first_deal_in_list_details’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/Second_deal_in_list’), 0)

WebUI.click(findTestObject(‘Tool/General_Objects/Second_deal_in_list’))

WebUI.verifyElementPresent(findTestObject(‘Tool/General_Objects/second_deal_in_list_details’), 0)

WebUI.waitForElementVisible(findTestObject(‘Tool/General_Objects/second_deal_in_list_details’), 0)

WebUI.closeBrowser()

Log In Test Case:

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.configuration.RunConfiguration
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable as GlobalVariable

WebUI.openBrowser(’’)

if (GlobalVariable.Environment == ‘Test1’ || GlobalVariable.Environment == ‘Test2’) {
WebUI.navigateToUrl(GlobalVariable.Login_to_Tool)

WebUI.setText(findTestObject('Tool/Page_Login/input_username'), 'some_user')

WebUI.setEncryptedText(findTestObject('Tool/Page_Login/input_password'), '12345')

WebUI.click(findTestObject('Tool/Page_Login/input_submit'))

} else {
WebUI.navigateToUrl(GlobalVariable.Tool_Link)
}

Thank you so much!

Just a guess - what is the type of GlobalVariable.Login_to_Tool? Is it String or something else?

Yes, it is the URL as a String.

Like:
https://xxx.xxx.xx/xxx/login?service=https://xxxx.server.lan:1234/Tool/

Additional Info:
If I set retry=2 the first run still fails, but during the second no problem occurs.

Looks like a bug to me.
Otherwise the error should always occur.

It sounds like a bug for me. But I am concerned that the behavior is not deterministic. Given that the test is still the same, it should follow the same path. And also I don’t know what “Overridden Global variable” is.

Hi @Dennis_Raunitschke,
Can you provide us a screen shot of variables you set in default profile? We need to check name and value of the variables, at least 3 ones: Environment, Login_to_Tool, and Tool_Link. Besides, if you run the script by Jenkins job, give us your batch command as well so that we can check if the issue comes from overriding global variables via command?

Hi,
I am not using the default environment, but here is the data for the environment I use.
Unfortunately I have to anonymize the link, but I kept all special characters in there:

grafik

Note on variable Tool_Link:
Only used when environment == LOCAL. Here I always use either Test1 or Test2 environment
grafik

Batch Command:

set +x
mkdir console_mode_reports

xvfb-run ${HOME}/Katalon_Studio/katalon -noSplash -runMode=console
-projectPath="${WORKSPACE}/Tool_UI_Tests/Tool_UI_Tests.prj"
-testSuitePath=“Test Suites/Tool/test_test_suite”
-executionProfile=“AC1” -browserType=“Firefox (headless)”
-summaryReport -reportFolder="${WORKSPACE}/console_mode_reports" \

@Loan_Tran
I set the the executionProfile to “default” , still doesn’t work consistently.

@Dennis_Raunitschke,
I verified your issue on Win and MAC but it works okay. I’m trying to set up the environment to check your issue on Linux. I’ll keep you posted as soon as possible.

@Loan_Tran
Thank you for investigating this further.

In the meanwhile I am still attempting to resolve this, too.

Searching through the forum, I currently try the following settings @Zarashima recommended in a different thread:

  1. Import the project /bin folder into the GIT repository
  2. Do not clean up the Jenkins workspace with every build
  • we upgraded Katalon from 5.8.5 to 5.10.1

This setup is currently in Test. So far it worked two builds in a row.
I’ll let you know if this fixed the issues.

Thanks,
Dennis

Good Morning,
the tests ran 9 times over the weekend w/o problems.

Current setup / run config to mitigate the issue:

  1. Katalon Version 5.10.1
  2. Import the project /bin folder into the GIT repository
  3. Do not clean up the Jenkins workspace with every build

Execution profile is != “default” -> still works fine.

1 Like

Hi,
I am facing the below error ,which I am facing after the installation of new version of katalon-it worked fine earlier ,-can somebody help me to overcome this:
Test Cases/PC Common Steps/LOBs/CPP/IM/IM_BuildersRisk FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to scroll to object ‘Object Repository/PC/InlandMarine/EDP/InputLimit’ (Root cause: org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression (//[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}] because of the following error:
SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string '(//
[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}]’ is not a valid XPath expression.
(Session info: chrome=73.0.3683.103)
(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘V-GWPRG-042’, ip: ‘10.5.138.106’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.core.webui.driver.ExistingRemoteWebDriver
Capabilities {javascriptEnabled: true, platform: ANY, platformName: ANY}
Session ID: 6df26ea4aac7c8ff827029343b2767fe
*** Element info: {Using=xpath, value=(//*[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}]})
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword.scrollToElement(ScrollToElementKeyword.groovy:88)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword.execute(ScrollToElementKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.scrollToElement(WebUiBuiltInKeywords.groovy:2975)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$scrollToElement$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at Script1552025448211.run(Script1552025448211.groovy:23)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:60)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:81)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:45)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1469)
at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
at Script1548844345248.run(Script1548844345248.groovy:303)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
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:264)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
at com.kms.katalon.core.main.TestCaseMain.runTestCaseRawScript(TestCaseMain.java:136)
at com.kms.katalon.core.main.TestCaseMain$runTestCaseRawScript$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at TempTestCase1555911503758.run(TempTestCase1555911503758.groovy:327)
at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
at groovy.lang.GroovyShell.run(GroovyShell.java:518)
at groovy.lang.GroovyShell.run(GroovyShell.java:507)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)
at groovy.ui.GroovyMain.run(GroovyMain.java:384)
at groovy.ui.GroovyMain.process(GroovyMain.java:370)
at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
at groovy.ui.GroovyMain.main(GroovyMain.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
)

Test Cases/PC Common Steps/Common/InputLimit.run:23
Test Cases/PC Common Steps/LOBs/CPP/IM/IM_BuildersRisk.run:303

-------------------------:

My code would be –
CustomKeywords.‘fmi.GW.gwWaitElementFail’(findTestObject(‘Object Repository/PC/InlandMarine/EDP/InputLimit’, [(‘Var’) : Var]), 10)

WebUI.scrollToElement(findTestObject(‘Object Repository/PC/InlandMarine/EDP/InputLimit’), 10)

CustomKeywords.‘fmi.GW.gwSetText’(findTestObject(‘Object Repository/PC/InlandMarine/EDP/InputLimit’, [(‘Var’) : Var]), Value)

X path written is -(//*[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}]

Wherein the var indicates the position of the input field and value as in the value to be value to be set within the input field

It dint work for the below Ways –
Tried to shorten the length of xpath
Edited the Caps or small case of letters in the xpath and tried.

it showed the below error in console:
04-22-2019 11:08:59 AM - [FAILED] - Unable to scroll to object ‘Object Repository/PC/InlandMarine/EDP/InputLimit’ (Root cause: org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression (//[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}] because of the following error:
SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string '(//
[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}]’ is not a valid XPath expression.
(Session info: chrome=73.0.3683.103)
(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘V-GWPRG-042’, ip: ‘10.5.138.106’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.core.webui.driver.ExistingRemoteWebDriver
Capabilities {javascriptEnabled: true, platform: ANY, platformName: ANY}
Session ID: 6df26ea4aac7c8ff827029343b2767fe
*** Element info: {Using=xpath, value=(//[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}]})
04-22-2019 11:08:59 AM - [END] - End action : scrollToElement
04-22-2019 11:08:59 AM - [FAILED] - Test Cases/PC Common Steps/Common/InputLimit FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to scroll to object ‘Object Repository/PC/InlandMarine/EDP/InputLimit’ (Root cause: org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression (//
[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}] because of the following error:
SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string ‘(//[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}]’ is not a valid XPath expression.
(Session info: chrome=73.0.3683.103)
(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘V-GWPRG-042’, ip: ‘10.5.138.106’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.core.webui.driver.ExistingRemoteWebDriver
Capabilities {javascriptEnabled: true, platform: ANY, platformName: ANY}
Session ID: 6df26ea4aac7c8ff827029343b2767fe
*** Element info: {Using=xpath, value=(//
[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}]})
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword.scrollToElement(ScrollToElementKeyword.groovy:88)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword.execute(ScrollToElementKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.scrollToElement(WebUiBuiltInKeywords.groovy:2975)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$scrollToElement$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at Script1552025448211.run(Script1552025448211.groovy:23)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:60)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:81)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:45)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1469)
at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
at Script1548844345248.run(Script1548844345248.groovy:303)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
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:264)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
at com.kms.katalon.core.main.TestCaseMain.runTestCaseRawScript(TestCaseMain.java:136)
at com.kms.katalon.core.main.TestCaseMain$runTestCaseRawScript$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at TempTestCase1555911503758.run(TempTestCase1555911503758.groovy:327)
at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
at groovy.lang.GroovyShell.run(GroovyShell.java:518)
at groovy.lang.GroovyShell.run(GroovyShell.java:507)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)
at groovy.ui.GroovyMain.run(GroovyMain.java:384)
at groovy.ui.GroovyMain.process(GroovyMain.java:370)
at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
at groovy.ui.GroovyMain.main(GroovyMain.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
)
04-22-2019 11:08:59 AM - [END] - End Test Case : Test Cases/PC Common Steps/Common/InputLimit
04-22-2019 11:08:59 AM - [FAILED] - Unable to call Test Case with id ‘Test Cases/PC Common Steps/Common/InputLimit’ (Root cause: Call Test Case ‘Test Cases/PC Common Steps/Common/InputLimit’ failed)
04-22-2019 11:08:59 AM - [END] - End action : callTestCase
04-22-2019 11:08:59 AM - [FAILED] - Test Cases/PC Common Steps/LOBs/CPP/IM/IM_BuildersRisk FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to scroll to object ‘Object Repository/PC/InlandMarine/EDP/InputLimit’ (Root cause: org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression (//[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}] because of the following error:
SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string '(//
[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}]’ is not a valid XPath expression.
(Session info: chrome=73.0.3683.103)
(Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘V-GWPRG-042’, ip: ‘10.5.138.106’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_181’
Driver info: com.kms.katalon.core.webui.driver.ExistingRemoteWebDriver
Capabilities {javascriptEnabled: true, platform: ANY, platformName: ANY}
Session ID: 6df26ea4aac7c8ff827029343b2767fe
*** Element info: {Using=xpath, value=(//*[contains(@id, ‘:1:DirectTermInput-inputEl’)])[${Var}]})
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword.scrollToElement(ScrollToElementKeyword.groovy:88)
at com.kms.katalon.core.webui.keyword.builtin.ScrollToElementKeyword.execute(ScrollToElementKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.scrollToElement(WebUiBuiltInKeywords.groovy:2975)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$scrollToElement$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at Script1552025448211.run(Script1552025448211.groovy:23)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:294)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:285)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:264)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:99)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.doCall(CallTestCaseKeyword.groovy:60)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword$_callTestCase_closure1.call(CallTestCaseKeyword.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:54)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.callTestCase(CallTestCaseKeyword.groovy:81)
at com.kms.katalon.core.keyword.builtin.CallTestCaseKeyword.execute(CallTestCaseKeyword.groovy:45)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.keyword.BuiltinKeywords.callTestCase(BuiltinKeywords.groovy:334)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1469)
at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
at Script1548844345248.run(Script1548844345248.groovy:303)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:183)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:108)
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:264)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:256)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:200)
at com.kms.katalon.core.main.TestCaseMain.runTestCaseRawScript(TestCaseMain.java:136)
at com.kms.katalon.core.main.TestCaseMain$runTestCaseRawScript$0.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at TempTestCase1555911503758.run(TempTestCase1555911503758.groovy:327)
at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
at groovy.lang.GroovyShell.run(GroovyShell.java:518)
at groovy.lang.GroovyShell.run(GroovyShell.java:507)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)
at groovy.ui.GroovyMain.run(GroovyMain.java:384)
at groovy.ui.GroovyMain.process(GroovyMain.java:370)
at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
at groovy.ui.GroovyMain.main(GroovyMain.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
)

Getting below mentioned error , while executing below code:

Katalon version:7.9.1

Error:

No signature of method: static com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords.sendRequest() is applicable for argument

types: (com.kms.katalon.core.testobject.RequestObject, java.util.LinkedHashMap, com.kms.katalon.core.model.FailureHandling) values: [TestObject - ‘Object Repository/RESTAPI_Transaction/Creation of PO’, …]

Possible solutions: sendRequest(com.kms.katalon.core.testobject.RequestObject, com.kms.katalon.core.model.FailureHandling), sendRequest(com.kms.katalon.core.testobject.RequestObject)