Search code examples
javascriptnode.jsseleniumdom-eventswebdriver-io

Webdriverio how to do a TAB key action


I am using webdriverIO with latest Chrome browser v77 and chromedriver v77.

When I try to do a browser.keys("\uE004"), I got an error:

Error:
The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.
at actions([object Object]) - keys.js:94:2.

Also I tried browser.keys("Tab"). That also didn't work. So anyone please help like I need to do a Tab Key action. How I can perform that. Currently this small issue is a huge blocker for all our automation. Please help


Solution

  • browser.setValue('input', ['Tab'])
    

    multiple key press can be done using

    browser.setValue('input', ['CTRL', 'A'])