Keystrokes Issue

I have written some 10k lines of codes in which I have used a number keystrokes. In the first 6k lines of the code the keystrokes are working fine, but in the next 6k lines of the codes, keystrokes are not even working and showing errors. Can you please suggest?

i am getting this below error.

Error executing KeyboardAction
com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=KeyboardAction.ftl,id=6925,name=Optional[KeyboardAction],parent=6920,nextSibling=6926,arguments=ActionArguments[keyLocation=[1],xsi:type=[recorder:KeyboardAction, recorder:KeyboardAction],keyChar=[100],pollingInterval=[300],active=[true],modifiers=[4],rawCode=[68],type=[HOT_KEY_PRESS],keyCode=[32],delay=[15000],actionDetails=[(Win+d)],text=[d],awaitTimeout=[5000]]]
at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:54)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:28)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:15)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:64)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:152)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:112)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.openqa.selenium.NoSuchElementException: Element “” doesn’t exist on the window ‘com.workfusion.autoit.driver.DesktopWindow@b39dcab’.
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘9.2.1.0’, revision: ‘733284ff9d’, time: ‘2019-02-20T13:03:34.418Z’

Command duration or timeout: 0 milliseconds
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:41)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:741)
at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
at org.openqa.selenium.remote.RemoteKeyboard.sendKeys(RemoteKeyboard.java:38)
at com.workfusion.rpa.helpers.RobotsKeyboard.sendKeys(RobotsKeyboard.java:49)
at com.workfusion.rpa.helpers.RPA.sendKeys(RPA.java:282)
at com.workfusion.rpa.helpers.RPA$sendKeys$1.callStatic(Unknown Source)
at Script81$_run_closure1.doCall(Script81.groovy:10)
at Script81$_run_closure1.doCall(Script81.groovy)
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:104)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
at groovy.lang.Closure.call(Closure.java:421)
at groovy.lang.Closure.call(Closure.java:415)
at com.workfusion.rpa.helpers.RPA.inDesktop(RPA.java:670)
at com.workfusion.rpa.helpers.RPA$inDesktop$0.callStatic(Unknown Source)
at Script81.run(Script81.groovy:9)
at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:48)
at com.workfusion.studio.rpa.recorder.playback.player.PlaybackContext.executeScript(PlaybackContext.java:65)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:33)
at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:28)
at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:15)
at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:64)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:152)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:112)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.openqa.selenium.NoSuchElementException: Element “” doesn’t exist on the window ‘com.workfusion.autoit.driver.DesktopWindow@b39dcab’.
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘9.2.1.0’, revision: ‘733284ff9d’, time: ‘2019-02-20T13:03:34.418Z’
System info: host: ‘CPCINCHPV002571’, ip: ‘10.142.196.66’, os.name: ‘Windows NT (unknown)’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_121’
Driver info: driver.version: unknown
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘9.2.0.4’, revision: ‘1a10eeeced’, time: ‘2018-11-29T10:44:59.891Z’
System info: host: ‘CPCINCHPV002571’, ip: ‘10.142.196.66’, os.name: ‘Windows NT (unknown)’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_121’
Driver info: driver.version: unknown
at com.workfusion.autoit.driver.KeyboardManager.throwExceptionIfNotExists(KeyboardManager.java:62)
at com.workfusion.autoit.driver.KeyboardManager.typeInActiveWindow(KeyboardManager.java:52)
at com.workfusion.autoit.driver.KeyboardManager.sendKeys(KeyboardManager.java:27)
at org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement.resolve(SendKeyToActiveElement.java:64)
at org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement.lambda$call$0(SendKeyToActiveElement.java:48)
at org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement.call(SendKeyToActiveElement.java:54)
at org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement.call(SendKeyToActiveElement.java:22)
at org.openqa.selenium.remote.server.handler.WebDriverHandler.handle(WebDriverHandler.java:41)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:133)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:205)
at org.openqa.selenium.remote.server.InMemorySession.execute(InMemorySession.java:98)
at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:231)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Hi, @sonali_parida it is better to divide such workflows into smaller parts. Can you divide it into 2 or more recordings and see if you still have this issue?

Also, do you have this option enabled in the Preferences?
image

1 Like

Hi, @ashapkina , I’ll try as you have suggested , i’ll split them into two small parts and try running and if i’ll get the same error again i’ll update you.Thanks for your Suggestions. :slight_smile:

2 Likes

Hi @sonali_parida did it solve your problem? I´m asking because I had to build a bot with a similar number of lines. Thanks in advance.