Keys did not match a known command

Hi, I have tried to use sendKeys() command in a new project and I am receiving an error message which I haven’t seen before. Can anyone help me out on this one? Thank you in advance.

The error message is following

EXECUTION FAILED
12:53:23 [INFO] POST /session/979716b4-35cb-407f-9a2c-5e73192f3970/keys did not match a known command Build info: version: ‘9.0.0.3’, revision: ‘1610cb545e’, time: ‘2018-05-24T16:45:36.185Z’ System info: host: ‘DESKTOP-2HHIFUH’, ip: ‘10.0.75.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_121’ Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper Capabilities [{moz:profile=C:\Users\Vladislav\AppData\Local\Temp\rust_mozprofile.MIHoBZj9NJR5, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, extra.remote.browser.driver.address=http://localhost:35003, moz:headless=false, platform=XP, moz:accessibilityChecks=false, moz:useNonSpecCompliantPointerOrigin=false, acceptInsecureCerts=false, browserVersion=62.0, platformVersion=10.0, moz:processID=26476, browserName=firefox, javascriptEnabled=true, platformName=XP, moz:webdriverClick=true}] Session ID: 979716b4-35cb-407f-9a2c-5e73192f3970

Hi @vladislav_sazB, can you share your code?

the code is very simple

   open("http://www.facebook.com")
   $(byId('email')).sendKeys('email')
   $(byId('pass')).sendKeys('password')
   $(byId('loginbutton')).click()
   sendKeys(Keys.PAGE_DOWN) // this causes error

You need to use inDesktop method to explicitly select Desktop driver

inDesktop{
sendKeys(Keys.PAGE_DOWN)
}
1 Like

Just tried it, this is the error I receive.

EXECUTION FAILED
15:03:35 [INFO] Current Selenium driver 'firefox' is not Universal driver, but is expected for requested action. Invoked action is not supported by this driver yet.

I was also not able to find this inDesktop{} function in the KB. Perhaps it should be added.
https://kb.workfusion.com/display/RPA/SendKeys+Keystrokes+Guide

@vladislav_sazB I thought you were using Universal driver. Can you share the whole code?

1 Like

Okey found the solution.

<robotics-flow>
		<robot driver="universal" name="justBot"> //use universal driver
		<capability name="SEARCH_ALL_WINDOWS" value="true" /> //add this capability
		<script><![CDATA[
		
		open("http://www.facebook.com")
		$(byId('email')).sendKeys('email')
		$(byId('pass')).sendKeys('pass')
		$(byId('loginbutton')).click()
		
		inDesktop{
			window("Facebook") //switch to window
			sendKeys(Keys.PAGE_DOWN)
		}

https://kb.workfusion.com/display/RPA/Universal+RPA+Driver

1 Like