How to send keys combinations to the page using webdriverjs?

692 Views Asked by At

I was trying to do

driver.keyDown(webdriver.Key.CONTROL).sendKeys(webdriver.Key.SPACE);

But it says that the method keyDown does not exist! Does anyone know how to do this? Is there a place where i can see webdriverjs api?

1

There are 1 best solutions below

0
Oscar On BEST ANSWER

If you are trying to pass CTRL+SPACE to sendkeys you can use Key.chord. Try this

driver.sendKeys(webdriver.Key.chord(webdriver.Key.CONTROL, webdriver.Key.SPACE))

You can find the webdriver js api documentation here http://seleniumhq.github.io/selenium/docs/api/javascript/