In MacOS, we simulate the
cmd key in the same way as we do with other keys. In the API, this key is called
meta (I think we need to add information about this to our documentation). So when you use:
TestCafe raises an event sequence similar to the one raised in the browser when you press these keys manually.
At the same time, TestCafe cannot automate a browser's built-in behavior including the Copy & Paste functionality. We expect that this functionality works correctly as it is tested by browsers' developers.
TestCafe has a set of supported shortcuts, which means that TestCafe can simulate browser behavior for the following key combinations:
'ctrl+a', 'backspace', 'delete', 'left', 'right', 'up', 'down', 'home', 'end', 'enter', 'tab', 'shift+tab', 'shift+left', 'shift+right', 'shift+up', 'shift+down', 'shift+home', 'shift+end'
These shortcuts are the same for Windows and MacOS, so you can use 'await t.pressKey('ctrl+a')' to select the entire text in the Input or TextArea .
If you have your own handlers for the Copy & Paste functionality and they don't work in a TestCafe test, please provide us with more information: your test and the URL of your page (or a simple example page that shows the problem).