How to insert using a key command in a nightwatch?

How can I insert a night clock? I tried this command:

browser.keys([browser.Keys.COMMAND, browser.Keys.v]) 

But the team does not work.

Ideally, I could plunge to save the copied text into a variable.

+4
source share
2 answers

This works for me, try the following:

 browser.keys([browser.Keys.CONTROL, "a"]) // highlight text browser.keys([browser.Keys.CONTROL, "c"]) // copy text browser.keys([browser.Keys.CONTROL, "v"]) // paste text 
0
source

The following command helped me press ENTER KEY.

 browser.keys([browser.Keys.ENTER]); 
-2
source

All Articles