Categories
javascript protractor selenium selenium-webdriver

How to send keys to the element in focus?

In my tests I have a number of modals and dropdowns which open and automatically have focus set on their input boxes.

I have seen that it is possible to assert that an element is in focus. But is there any shortcut way to send keys to the element currently in focus? I’d like to be able to skip all the work of finding each element every time.