Hold keystroke custom action issue

Hi team,

I’m having trouble with a custom action solution to holding keystrokes found here: How to ctrl + left click in the same time

When running while an automated browser is open, the custom action fails with the following error:

Error executing CustomScriptAction
com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=CustomScriptAction.ftl,id=18,name=Optional[CustomScriptAction],parent=17,arguments=ActionArguments[delay=[0],timeoutMs=[100],xsi:type=[recorder:CustomScriptAction, recorder:CustomScriptAction],name=[Hold CTRL Key],pollingInterval=[100],active=[true],comment=[],script=[@CustomScriptAction

def customScript() {
keyboard().pressKey(Keys.CONTROL)
}],awaitTimeout=[100]]]
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:81)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:154)
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.UnsupportedCommandException: POST /session/1667e86e-904f-4c4d-81f0-fff09c972473/keys did not match a known command
Build info: version: ‘9.4.0.3’, revision: ‘abf2ebe0f1’, time: ‘2019-05-29T13:21:06.482Z’
System info: host: ‘WILSONG4’, ip: ‘192.168.112.137’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_121’
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{moz:profile=C:\Users\wwylie\AppData\Local\Temp\rust_mozprofile.L4OuZQrRdiwg, rotatable=false, moz:geckodriverVersion=0.22.0, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, unhandledPromptBehavior=dismiss and notify, strictFileInteractability=false, moz:headless=false, platform=XP, moz:accessibilityChecks=false, moz:useNonSpecCompliantPointerOrigin=false, acceptInsecureCerts=false, browserVersion=80.0.1, moz:shutdownTimeout=60000, platformVersion=10.0, moz:processID=5652, browserName=firefox, moz:buildID=20200831163820, javascriptEnabled=true, platformName=XP, setWindowRect=true, moz:webdriverClick=true}]
Session ID: 1667e86e-904f-4c4d-81f0-fff09c972473
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.pressKey(RemoteKeyboard.java:47)
at com.workfusion.rpa.helpers.RobotsKeyboard.pressKey(RobotsKeyboard.java:60)
at org.openqa.selenium.interactions.Keyboard$pressKey.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
at CustomScript_customScript.customScript(Script3.groovy:19)
at CustomScript_customScript$customScript.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at Script3.run(Script3.groovy)
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:108)
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:81)
at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:154)
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.UnsupportedCommandException: POST /session/1667e86e-904f-4c4d-81f0-fff09c972473/keys did not match a known command
Build info: version: ‘9.4.0.3’, revision: ‘abf2ebe0f1’, time: ‘2019-05-29T13:21:06.482Z’
System info: host: ‘WILSONG4’, ip: ‘192.168.112.137’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_121’
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{moz:profile=C:\Users\wwylie\AppData\Local\Temp\rust_mozprofile.L4OuZQrRdiwg, rotatable=false, moz:geckodriverVersion=0.22.0, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, unhandledPromptBehavior=dismiss and notify, strictFileInteractability=false, moz:headless=false, platform=XP, moz:accessibilityChecks=false, moz:useNonSpecCompliantPointerOrigin=false, acceptInsecureCerts=false, browserVersion=80.0.1, moz:shutdownTimeout=60000, platformVersion=10.0, moz:processID=5652, browserName=firefox, moz:buildID=20200831163820, javascriptEnabled=true, platformName=XP, setWindowRect=true, moz:webdriverClick=true}]
Session ID: 1667e86e-904f-4c4d-81f0-fff09c972473
Build info: version: ‘9.4.0.4’, revision: ‘1fbe520b9b’, time: ‘2019-06-20T13:08:57.971Z’
System info: host: ‘WILSONG4’, ip: ‘192.168.112.137’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_121’
Driver info: driver.version: RemoteWebDriver
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.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:186)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:121)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
at org.openqa.selenium.remote.server.ActiveSessionCommandExecutor.execute(ActiveSessionCommandExecutor.java:43)
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.pressKey(RemoteKeyboard.java:47)
at org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement.resolve(SendKeyToActiveElement.java:62)
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:134)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:206)
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)

Any ideas how to get this to work within an automated browser?