0

I want to use selenium-standalone-server to run some tests but when it reaches a sendKeys command i get this error: Unknown command: 'sendKeys'

this is my full command:

sendKeys    | xpath=//input[@type='file'] | abcde

as far as i know selenium standalone server uses webdrive which supports sendKeys!!

any body can help? note that i get this problem both on firefox and google chorme and i'm using selenium-server-2.42.2.jar

I know that type works but i want sendKeys as it should work either.

hasan
  • 966
  • 2
  • 13
  • 40
  • have you tried type instead? and, by standalone server do you mean selenium RC? – Saifur Dec 27 '14 at 16:49
  • Yes i tried `type` and it works but it does not solve my problem. i need send keys as addressed [here](http://stackoverflow.com/questions/9665021/selenium-upload-file-in-google-chrome). no I exactly mean [standalone server](http://www.seleniumhq.org/download/) which is a successor to selenium RC Server – hasan Dec 27 '14 at 17:56
  • Is fileupload your problem? Then simply use `type` and `full file path including extension` should work. I don't think `sendKeys` is supported by `RC` – Saifur Dec 27 '14 at 18:22

1 Answers1

1

Using type with full file path should work as expected.

type | xpath=//input[@type='file'] | "c:\\myfile.txt"
Saifur
  • 16,081
  • 6
  • 49
  • 73
  • this works for firefox bot not for google chrome: and i get this Error: `field can only set to empty string from code` – hasan Dec 28 '14 at 11:19