Stack Trace error while trying to send Enter keys

Stack Trace error while trying to send Enter keys,here is script

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.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 internal.GlobalVariable as GlobalVariable

WebUI.openBrowser(’’)

WebUI.navigateToUrl(‘https://dev/event-reservations-web’)

WebUI.setText(findTestObject(‘Object Repository/Page_event-reservations-web/input’), ‘Renton, WA, USA’)

WebUI.delay(4)

WebUI.delay(4)

WebUI.sendKeys(findTestObject(‘Object Repository/Page_event-reservations-web/input’), Keys.chord(Keys.ENTER))

================================================================
Error is below

10-05-2018 12:29:21 PM - [START] - Start Test Case : Test Cases/New Test Case

10-05-2018 12:29:21 PM - [INFO] - Evaluating variables for test case

10-05-2018 12:29:21 PM - [START] - Start action : openBrowser

10-05-2018 12:29:22 PM - [INFO] - Opening browser

10-05-2018 12:29:22 PM - [INFO] - Starting ‘Chrome’ driver

10-05-2018 12:29:22 PM - [INFO] - Action delay is set to 0 seconds

Starting ChromeDriver 2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73) on port 10601

Only local connections are allowed.

Oct 05, 2018 12:29:25 PM org.openqa.selenium.remote.ProtocolHandshake createSession

INFO: Detected dialect: OSS

10-05-2018 12:29:25 PM - [RUN_DATA] - Logging run data ‘sessionId’ with value ‘2c2ba6a457dc2b586543be85ae8bdf3e’

10-05-2018 12:29:25 PM - [RUN_DATA] - Logging run data ‘browser’ with value ‘Chrome 69.0.3497.100’

10-05-2018 12:29:25 PM - [RUN_DATA] - Logging run data ‘platform’ with value ‘Windows 10’

10-05-2018 12:29:25 PM - [RUN_DATA] - Logging run data ‘seleniumVersion’ with value ‘3.7.1’

10-05-2018 12:29:25 PM - [RUN_DATA] - Logging run data ‘proxyInformation’ with value ‘ProxyInformation{proxyOption=NO_PROXY, proxyServerType=HTTP, password=, proxyServerAddress=, proxyServerPort=0}’

10-05-2018 12:29:25 PM - [PASSED] - Browser is opened with url: ‘’

10-05-2018 12:29:25 PM - [END] - End action : openBrowser

10-05-2018 12:29:25 PM - [START] - Start action : navigateToUrl

10-05-2018 12:29:25 PM - [INFO] - Checking url

10-05-2018 12:29:25 PM - [INFO] - Navigating to ‘https://dev/event-reservations-web

10-05-2018 12:29:26 PM - [PASSED] - Navigate to ‘https://dev/event-reservations-web’ successfully

10-05-2018 12:29:26 PM - [END] - End action : navigateToUrl

10-05-2018 12:29:26 PM - [START] - Start action : setText

10-05-2018 12:29:26 PM - [INFO] - Finding Test Object with id ‘Object Repository/Page_event-reservations-web/input’

10-05-2018 12:29:26 PM - [INFO] - Checking object

10-05-2018 12:29:26 PM - [INFO] - Checking text

10-05-2018 12:29:26 PM - [INFO] - Checking timeout

10-05-2018 12:29:26 PM - [INFO] - Finding web element with id: ‘Object Repository/Page_event-reservations-web/input’ located by ‘By.xpath: //input[@type=‘text’]’ in ‘30’ second(s)

10-05-2018 12:29:26 PM - [INFO] - Found 1 web elements with id: ‘Object Repository/Page_event-reservations-web/input’ located by ‘By.xpath: //input[@type=‘text’]’ in ‘30’ second(s)

10-05-2018 12:29:26 PM - [INFO] - Clearing text of object ‘Object Repository/Page_event-reservations-web/input’

10-05-2018 12:29:26 PM - [INFO] - Checking timeout

10-05-2018 12:29:26 PM - [INFO] - Finding web element with id: ‘Object Repository/Page_event-reservations-web/input’ located by ‘By.xpath: //input[@type=‘text’]’ in ‘30’ second(s)

10-05-2018 12:29:26 PM - [INFO] - Found 1 web elements with id: ‘Object Repository/Page_event-reservations-web/input’ located by ‘By.xpath: //input[@type=‘text’]’ in ‘30’ second(s)

10-05-2018 12:29:26 PM - [INFO] - Setting text of object ‘Object Repository/Page_event-reservations-web/input’ to value ‘Renton, WA, USA’

10-05-2018 12:29:26 PM - [PASSED] - Text ‘Renton, WA, USA’ is set on object ‘Object Repository/Page_event-reservations-web/input’

10-05-2018 12:29:26 PM - [END] - End action : setText

10-05-2018 12:29:26 PM - [START] - Start action : delay

10-05-2018 12:29:26 PM - [INFO] - Delaying browser in 4 second(s)

10-05-2018 12:29:30 PM - [PASSED] - Delayed 4 second(s)

10-05-2018 12:29:30 PM - [END] - End action : delay

10-05-2018 12:29:30 PM - [START] - Start action : delay

10-05-2018 12:29:30 PM - [INFO] - Delaying browser in 4 second(s)

10-05-2018 12:29:34 PM - [PASSED] - Delayed 4 second(s)

10-05-2018 12:29:34 PM - [END] - End action : delay

10-05-2018 12:29:34 PM - [START] - Start action : sendKeys

10-05-2018 12:29:34 PM - [INFO] - Finding Test Object with id ‘Object Repository/Page_event-reservations-web/input’

10-05-2018 12:29:34 PM - [END] - End action : sendKeys

10-05-2018 12:29:34 PM - [ERROR] - Test Cases/New Test Case FAILED because (of) (Stack trace: groovy.lang.MissingPropertyException: No such property: Keys for class: Script1538499925224

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)

at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52)

at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)

at Script1538499925224.run(Script1538499925224.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.main.TestCaseMain.runTestCase(TestCaseMain.java:90)

at com.kms.katalon.core.main.TestCaseMain$runTestCase$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:149)

at TempTestCase1538767758883.run(TempTestCase1538767758883.groovy:22)

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)

)

10-05-2018 12:29:34 PM - [END] - End Test Case : Test Cases/New Test Case

try import

import org.openqa.selenium.Keys as Keys

1 Like

By importing, you can effectively deal with this issue. I think the most suitable way to handle this error would be to import.
Thanks and regards.

1 Like